React 和 Angular 中的 Web3 和 Webpack 错误库

问题描述 投票:0回答:0

我使用“react”:“^17.0.2”, 我尝试通过 npm i web3 添加 web3 库 但是当我尝试像这样实例化我的 web3 对象时 web3 = new Web3((任意窗口).ethereum); 或者像这样 web3 = new Web3();

我尝试启动我的应用程序(npm start)

我遇到很多错误

  • 关于我的 webpack,我必须在 webpack.config.js 中添加一些后备
Compiled with problems:

./node_modules/cipher-base/index.js 中的错误 3:16-43

找不到模块:错误:无法解析“流” 'C:... 颂歌模块

reactjs webpack web3js
© www.soinside.com 2019 - 2024. All rights reserved.