Module not found: Can't resolve 'jose/jwt/sign'
See original GitHub issueDescribe the bug
To Reproduce
- npm install jose
- Try to import like so: import { SignJWT } from “jose/jwt/sign”;
- Typescript compiler errors: Module not found: Can’t resolve ‘jose/jwt/sign’
Code to reproduce the behaviour: https://stackblitz.com/edit/react-ts-kkyw3y
Expected behaviour Should import correctly with no errors
Environment:
jose
version: v3.11.6- affected runtime is: Node.js 14.15.0
- other relevant library versions: typescript@4.2.4
Issue Analytics
- State:
- Created 2 years ago
- Comments:24 (11 by maintainers)
Top Results From Across the Web
Error: Cannot find module 'jose' in node js
The jose package exports individual ESM modules, as in, there's no root jose module in version 3.x that you're installing.
Read more >jose - npm
Each module is to be individually imported as explained in each individual module's documentation. "Module not found: Error: Can't resolve '...' ...
Read more >jose/README.md
The CDN for jose. ... JWS, JWE, JWT, JWK with no dependencies using native crypto runtimes ... 253, #### "Module not found: Error:...
Read more >Can't resolve 'crypto' in node_modules/bson/dist react
I'm using realm-web on my react app to build a simple task reminder app. But, when I start/build the app it is giving...
Read more >React JWT Authentication (without Redux) example
Unfortunattely still no luck. I get an error message “Module not found: Can't resolve 'react-validation/build/button'. I tried to solve this by ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have this error in a standard create-react-app typescript setup. I think this should be re-opened and investigated. if we need to take care of something maybe the fix is just adding some guidance on the read.me file.
@dalegacusan you’re barking up the wrong tree - this is to be solved in your tooling, not here.