我使用expo init
并且我正在尝试实现web3
,我遵循了我在github上找到的每条指令,但是我仍然遇到错误
While trying to resolve module `crypto` from file `/home/user/Desktop/Wallet/Fanbase-Wallet-App/node_modules/bignumber.js/bignumber.js`, the package `/home/user/Desktop/Wallet/Fanbase-Wallet-App/node_modules/crypto/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/home/user/Desktop/Wallet/Fanbase-Wallet-App/node_modules/crypto/index.js`. Indeed, none of these files exist:
我在package.json
中这样加密了
"crypto": "react-native-crypto",
关于如何解决此问题的任何建议?
答案 0 :(得分:0)
您必须使用crypto
模块的expo版本。
expo install expo-crypto
更多信息,请点击此处https://docs.expo.io/versions/latest/sdk/crypto/
对于web3,expo中还有其他实现。这是CRNA应用程序之一。但是评论中包含更多细节,以使其能够在博览会上正常工作。 https://gist.github.com/dougbacelar/29e60920d8fa1982535247563eb63766