大家好,我是 React 的新手,当我开始我的项目时,我收到 Wepback V5 错误消息
解决更新:https://github.com/facebook/create-react-app/issues/11756#issuecomment-1001162736
这是用什么啊!
Os: Win11
Node : v16
React:v17
React-script : v5
Webpack:v5
Run Code Online (Sandbox Code Playgroud)
此错误消息包含
Crypto
Http
Https
Stream
Run Code Online (Sandbox Code Playgroud)
错误输出
编译有问题:X
ERROR in ./node_modules/eth-lib/lib/bytes.js 9:193-227
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\PC\Desktop\Portfolio\portfolio_app\node_modules\eth-lib\lib'
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, …Run Code Online (Sandbox Code Playgroud)