我想在我的项目中使用“@walletconnect/web3-provider”JS库,但是一旦我将库与Web3模块一起安装(它们将一起使用)
npm install --save web3 @walletconnect/web3-provider
Run Code Online (Sandbox Code Playgroud)
然后将其导入到我的项目中(在 React 项目的 App.js 文件中)
import WalletConnectProvider from '@walletconnect/web3-provider';
Run Code Online (Sandbox Code Playgroud)
它抱怨这么多错误!
19 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.68.0 compiled with 19 errors and 110 warnings in 23859 ms
Run Code Online (Sandbox Code Playgroud)
以下是出现在服务器端(在 VS Code 终端中)的错误消息部分:
WARNING in ./node_modules/@walletconnect/jsonrpc-types/dist/esm/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'F:\Work\Tellor\testField\test-wallet-connect\node_modules\@walletconnect\jsonrpc-types\src\index.ts' file: Error: ENOENT: no such file or directory, open 'F:\Work\Tellor\testField\test-wallet-connect\node_modules\@walletconnect\jsonrpc-types\src\index.ts'
@ ./node_modules/@walletconnect/jsonrpc-utils/dist/esm/types.js 1:0-45 1:0-45
@ ./node_modules/@walletconnect/jsonrpc-utils/dist/esm/index.js 6:0-24 …Run Code Online (Sandbox Code Playgroud)