question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module not found: Can't resolve 'jose/jwt/sign'

See original GitHub issue

Describe the bug

To Reproduce

  1. npm install jose
  2. Try to import like so: import { SignJWT } from “jose/jwt/sign”;
  3. 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:closed
  • Created 2 years ago
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

11reactions
a7madgamalcommented, Jun 16, 2021

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.

2reactions
panvacommented, Sep 22, 2021

@dalegacusan you’re barking up the wrong tree - this is to be solved in your tooling, not here.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found