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

Installing with deno add jsr:@nostr/tools returns an error #459

Closed
gustavonmartins opened this issue Nov 25, 2024 · 4 comments
Closed

Installing with deno add jsr:@nostr/tools returns an error #459

gustavonmartins opened this issue Nov 25, 2024 · 4 comments

Comments

@gustavonmartins
Copy link

I just tried installing with deno 2.1.1 using the command
deno add jsr:@nostr/tools

But at the end of the installation I get the error:

Add jsr:@nostr/[email protected]
Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:
┠─ npm:[email protected]
┠─ npm:[email protected]
┠─ npm:[email protected]
┃
┠─ This may cause the packages to not work correctly.
┠─ Lifecycle scripts are only supported when using a `node_modules` directory.
┠─ Enable it in your deno config file:
┖─ "nodeModulesDir": "auto"
error: Could not find dist-tag 'v0.1.0' for npm package 'nostr-wasm'.
    at https://jsr.io/@nostr/tools/2.10.3/wasm.ts:2:36

Note the error

error: Could not find dist-tag 'v0.1.0' for npm package 'nostr-wasm'.
    at https://jsr.io/@nostr/tools/2.10.3/wasm.ts:2:36

Weird is that though there is this error, somehow I can run the lib with no problems

@alexgleason
Copy link
Collaborator

Install it with npm:nostr-tools. The jsr build is broken.

@gustavonmartins
Copy link
Author

gustavonmartins commented Nov 25, 2024

Wouldnt it make sense to remove the instruciton on readme file
npx jsr add @nostr/tools
And also to clarify this on issue #376?
I got the idea of using JSR from there

@fiatjaf
Copy link
Collaborator

fiatjaf commented Nov 26, 2024

It is not broken anymore. I have installed it with jsr add @nostr/tools many times, never encountering this error.

But I understand it now. The nostr-wasm version has a wrong v prefix and npm "fixes" that when downloading, but deno doesn't, and jsr uses npm for fetching. Postel's law attacks again in all its stupidity. I'll fix this.

@fiatjaf
Copy link
Collaborator

fiatjaf commented Nov 26, 2024

Now if this is not the problem then I suggest reporting to the Deno authorities. Maybe they will decide to create a new JS runtime called Nedo to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants