Just installed [email protected] and required the module, then immediately got the error "Cannot find node_modules/jws/lib/sign-stream.js"
Context: Running this on React Native
I am not familiar with React Native, but the file is there. Try rm -rf node_modules && npm i
Having the same issue as @calclavia. I tried reinstalling the node module but still no luck. It seems like several dependencies are missing. I manually installed stream, only to see that more modules were missing.
@jfromaniello Tried that as well. Did not fix it.
Any update on this issue? Still having this problem...
Just got this problem today trying to use 7.2.1.
Using React-Native 0.41
According to this https://github.com/facebook/react-native/issues/3874#issuecomment-167150393
Node core modules cannot be used inside React Native as it's a completely different environment
I only needed to decode the token and switched to using this https://github.com/auth0/jwt-decode
In any case, this issue can be closed. It isn't really applicable to node-jsonwebtoken itself.
Is there any React-Native alternative that can performsign() with HMAC SHA256?
Can't find any that would work.
@anders-g-hansen could you please let me know how you managed to make it work with jwt-decode https://github.com/auth0/node-jsonwebtoken/issues/221#issuecomment-283108676
You can try this module react-native-pure-jwt
Most helpful comment
According to this https://github.com/facebook/react-native/issues/3874#issuecomment-167150393
I only needed to decode the token and switched to using this https://github.com/auth0/jwt-decode
In any case, this issue can be closed. It isn't really applicable to node-jsonwebtoken itself.