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

deno add fails to add a jsr: package to a deno.json when project only contains package.json #26119

Closed
DanieliusDev opened this issue Oct 10, 2024 · 1 comment · Fixed by #26275
Assignees
Labels
bug Something isn't working correctly install

Comments

@DanieliusDev
Copy link

Version: Deno 2.0.0

How to reproduce

files:
package.json created manually
deno.json not created manually

$ deno add jsr:@std/assert
Add jsr:@std/[email protected]
error: npm package '@jsr/std__assert' does not exist.

what deno creates in package.json from running the above command

{
  "dependencies": {
    "@std/assert": "npm:@jsr/std__assert@^1.0.6"
  }
}
@DanieliusDev DanieliusDev changed the title deno add with a package.json fails to add a jsr: package to a deno.json deno add fails to add a jsr: package to a deno.json when project only contains package.json Oct 10, 2024
@marvinhagemeister marvinhagemeister added bug Something isn't working correctly install labels Oct 11, 2024
@tchajed
Copy link

tchajed commented Oct 15, 2024

I ran into this bug from following the instructions in the Vue tutorial (https://docs.deno.com/runtime/tutorials/how_to_with_npm/vue/). It might make sense to update the tutorial text or the npm:create-vite task if the fix to deno add will take longer.

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 install
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants