小编Szy*_*Żak的帖子

Web3 和 Angular 11 破坏了依赖关系

我正在尝试使用 Angular 创建以太坊 dapp。我正在关注那篇文章:https : //medium.com/blockchain-developer/learn-how-to-create-your-own-dapp-with-angular-9-part-iv-truffle-7704dc4269ab 但是,当我添加web3 to app with npm install --save web3,并在代码中调用它,我遇到了以下问题:

Error: ./node_modules/swarm-js/node_modules/eth-lib/lib/bytes.js
Module not found: Error: Can't resolve 'crypto' in '/home/szymon/dev/dapp/node_modules/swarm-js/node_modules/eth-lib/lib'

Error: ./node_modules/web3-eth-accounts/node_modules/eth-lib/lib/bytes.js
Module not found: Error: Can't resolve 'crypto' in '/home/szymon/dev/dapp/node_modules/web3-eth-accounts/node_modules/eth-lib/lib'

Error: ./node_modules/web3-eth-accounts/src/index.js
Module not found: Error: Can't resolve 'crypto' in '/home/szymon/dev/dapp/node_modules/web3-eth-accounts/src'

Error: ./node_modules/web3-providers-http/src/index.js
Module not found: Error: Can't resolve 'http' in '/home/szymon/dev/dapp/node_modules/web3-providers-http/src'

Error: ./node_modules/xhr2-cookies/dist/xml-http-request.js
Module not found: Error: Can't resolve 'http' in '/home/szymon/dev/dapp/node_modules/xhr2-cookies/dist'

Error: ./node_modules/web3-providers-http/src/index.js
Module not found: Error: Can't resolve 'https' …
Run Code Online (Sandbox Code Playgroud)

angular web3-donotuse

11
推荐指数
1
解决办法
1152
查看次数

相当于 JUnit5 的 @RunWith(JUnitPlatform.class)

在我的项目中,我正在做一些清理工作并决定将所有内容移至 JUnit5。

到目前为止,我一直在使用

@RunWith(JUnitPlatform.class)
Run Code Online (Sandbox Code Playgroud)

现在我想将它迁移到@ExtendWith。这个 JUnitPlatform.class 在 JUnit5 中是否有任何等价物?

java migration junit junit4 junit5

8
推荐指数
2
解决办法
8266
查看次数

标签 统计

angular ×1

java ×1

junit ×1

junit4 ×1

junit5 ×1

migration ×1

web3-donotuse ×1