Could not resolve "stream" and "crypto" in quasar-cli with vite #14796
Unanswered
icebergtsn
asked this question in
Quasar App Extensions
Replies: 1 comment 2 replies
-
|
just extend the viteConfig to include the needed polyfills |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
I used quasar webpack to write extensions manifest v2 before, but quasar webpack does not support manifest v3, so I switched to vite, unable to get steam and crypto, webpack had a solution before, but I didn't find an effective solution in vite
webpack:https://quasar.dev/start/upgrade-guide#nodejs-polyfills
vite:?
error
✘ [ERROR] Could not resolve "stream"
The package "stream" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "crypto"
The package "crypto" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
node_modules/@metamask/obs-store/dist/asStream.js:4:25: ERROR: Could not resolve "stream"
node_modules/cipher-base/index.js:2:24: ERROR: Could not resolve "stream"
node_modules/ethereumjs-wallet/dist.browser/index.js:73:34: ERROR: Could not resolve "crypto"
node_modules/ethereumjs-wallet/dist.browser/thirdparty.js:62:34: ERROR: Could not resolve "crypto"
====================================
Beta Was this translation helpful? Give feedback.
All reactions