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

Page suggests deno add command that fails #760

Open
leighmcculloch opened this issue Oct 16, 2024 · 2 comments
Open

Page suggests deno add command that fails #760

leighmcculloch opened this issue Oct 16, 2024 · 2 comments
Labels

Comments

@leighmcculloch
Copy link

leighmcculloch commented Oct 16, 2024

Loving the new registery 👏🏻

It appears that the jsr website provides an instruction to use deno add <package> to install, even when viewing specific versions of a package.

I can see how that would make sense a lot of the time, however when viewing a release candidate version of a package that has not yet created a stable release, that command will always error.

For example, when I visit the page for @cliffy/command the command on the right says to run deno add @cliffy/command.

Screenshot 2024-10-16 at 3 37 11 PM

When I run that command, I see an error that makes it sound like the package is missing all together.

$ deno add @cliffy/command
error: @cliffy/command was not found in either jsr or npm.

I understand the add command when not given a version is looking for the latest stable release and not finding one.

The error message could be more helpful. It could say in this case that @cliffy/command was found but no stable version was found, and to add an unstable version the version must be specified.

The jsr website could also include the version in the command to copy-paste so that folks get it right first time.

@lucacasonato
Copy link
Member

Where are you seeing this? The right hand sidebar says deno add jsr:@cliffy/command (note the jsr:).

@leighmcculloch
Copy link
Author

leighmcculloch commented Oct 28, 2024

Adding the jsr: prefix makes no difference in this instance. If you note with the error message above it searched both jsr and npm.

Here is the command with the jsr prefix displaying the same / similar error:

$ deno add jsr:@cliffy/command
error: jsr:@cliffy/command was not found.

And here it is working when a version is specified.

$ deno add jsr:@cliffy/[email protected]
Add jsr:@cliffy/[email protected]

A version is required because there is no stable version of @cliffy/command published. All the versions published are pre-release versions, and deno add is only looking for stable versions when no version is specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
Development

No branches or pull requests

2 participants