I am using the quasar cli to create a vue 3 application. I have installed jsonwebtoken via yarn. When I try to compile the application I get the errors listed below:
App • ERROR • UI in ./node_modules/jwa/index.js
Module not found: Can't resolve imported dependency "crypto"
Did you forget to install it? You can run: yarn add crypto
App • ERROR • UI in ./node_modules/jwa/index.js
Module not found: Can't resolve imported dependency "util"
Did you forget to install it? You can run: yarn add util
App • ERROR • UI in ./node_modules/jws/lib/data-stream.js
Module not found: Can't resolve imported dependency "stream"
Did you forget to install it? You can run: yarn add stream
App • ERROR • UI in ./node_modules/jws/lib/data-stream.js
Module not found: Can't resolve imported dependency "util"
Did you forget to install it? You can run: yarn add util
I can run "yarn add util" and "yarn add stream" and those errors go away but I do not know if that is the correct solution to the problem. Regardless, I can't just run "yarn add crypto" to resolve that error. When you do you get the following warning...
warning crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
But I'm not sure what needs to be done here to "switch to the one that's built-in" and am very curious if everyone runs into this when using jsonwebtoken?