【发布时间】:2022-07-30 04:16:45
【问题描述】:
我遇到了一个烦人的问题。我正在尝试在其他事情上使用 web3 构建一个项目,但我遇到了一些我无法解决的编译错误:
Compiled with problems: X
ERROR in ../node_modules/cipher-base/index.js 3:16-43
Module not found: Error: Can't resolve 'stream' in 'C:\CAS\node_modules\cipher-base'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
我尝试了很多东西,但无法成功。 有人可以帮忙吗?
【问题讨论】:
-
确切地说,我测试了stackoverflow.com/questions/70557596/… 中的所有内容,但无法正常工作
-
这个错误似乎很清楚如何解决它。
标签: javascript