Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx jsr publish fails due to graphError #24430

Closed
tungv opened this issue Jul 4, 2024 · 2 comments · Fixed by #24435
Closed

npx jsr publish fails due to graphError #24430

tungv opened this issue Jul 4, 2024 · 2 comments · Fixed by #24435
Assignees
Labels
bug Something isn't working correctly high priority publish Related to "deno publish" subcommand

Comments

@tungv
Copy link

tungv commented Jul 4, 2024

Version: Deno canary 147411e

Before the release of the 147411e canary, publishing worked fine
After the release of the said version npx jsr publish fails to change the naked imports to npm: specifiers that in turn causes a graphError failure.

repro: https://github.com/tungv/jsr-publish-fails-repro

// src/index.ts
import _ from "lodash";

console.log(_.concat("Hello via Bun!"));
// package.json
{
  // ....
  "dependencies": {
    "lodash": "^4.17.21"
  }
}

Error message:

Downloading JSR binary...
[00:00] [################################################>-] 37.5 MiB/38.3 MiB
Checking for slow types in the public API...
Publishing @jerni/publish-test@0.0.3 ...
error: Failed to publish @jerni/publish-test@0.0.3

Caused by:
    Failed to publish @jerni/publish-test at 0.0.3: failed to build module graph: Module not found "file:///src/lodash".
        at file:///src/index.ts:1:15
Child process exited with: 1

It works when I manually change the import in src/index.ts to

import _ from "npm:lodash@^4.17.21";

I also verified the previous version works:

# revert to last version
cd node_modules/jsr/.download/147411e64b22fe74cb258125acab83f9182c9f81/darwin/
wget https://dl.deno.land/canary/dd6d19e12051fac2ea5639f621501f4710a1b8e1/deno-aarch64-apple-darwin.zip
unzip deno-aarch64-apple-darwin.zip
@tungv
Copy link
Author

tungv commented Jul 5, 2024

thanks, it works now.

jpwilliams added a commit to inngest/inngest-js that referenced this issue Jul 5, 2024
…ed npm"

This reverts commit 61262b3.

Re-enabling following a fix from the Deno team at denoland/deno#24430
@jpwilliams
Copy link

Thank you for your quick work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly high priority publish Related to "deno publish" subcommand
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants