jsr
jsr copied to clipboard
error[unsupported-nested-javascript]: referenced a JavaScript module without type declarations from a TypeScript module
There's a problem with types in the @noble/hashes (github, npm) module in my package.json
When I run npx jsr publish I get the following error:
➜ nostr-tools git:(master) ✗ npx jsr publish --dry-run
Checking for slow types in the public API...
error[unsupported-nested-javascript]: referenced a JavaScript module without type declarations from a TypeScript module
--> /home/alex/Projects/nostr-tools/node_modules/.deno/@[email protected]/node_modules/@noble/hashes/utils.d.ts
= hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript
info: JavaScript files with no corresponding declaration require type inference to be type checked
info: fast check avoids type inference, so referencing a JavaScript file with no type declarations is not supported
docs: https://jsr.io/go/slow-type-unsupported-nested-javascript
This package contains errors for slow types. Fixing these errors will:
1. Significantly improve your package users' type checking performance.
4. Improve the automatic documentation generation.
5. Enable automatic .d.ts generation for Node.js.
Don't want to bother? You can choose to skip this step by
providing the --allow-slow-types flag.
error: Found 1 problem
Child process exited with: 1
Things I tried:
- having
"type": "module"in package.json - having
"moduleResolution": "Bundler"in tsconfig.json
The upstream package has types:
This issue does not occur when using deno publish, only npx jsr
@alexgleason What problem is failing to publish? noble-hashes or nostr-tools?
Closing as I didn't get a response from DM. I think this was fixed already.