小编Idr*_*iss的帖子

我尝试在 webpack 5 中 Polyfill 模块但不起作用(Reactjs)

大家好,我是 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)

node.js reactjs webpack moralis

37
推荐指数
5
解决办法
12万
查看次数

标签 统计

moralis ×1

node.js ×1

reactjs ×1

webpack ×1