问题是当我运行yarn start时,会出现一些警告,如下所示:
WARNING in ./node_modules/@usedapp/core/dist/esm/src/providers/transactions/reducer.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/mac/Desktop/react-django-nft-marketplace/react_django_nft_marketplace/frontend/frontend/node_modules/@usedapp/core/dist/esm/src/providers/transactions/reducer.js.map' file: Error: ENOENT: no such file or directory, open '/Users/mac/Desktop/react-django-nft-marketplace/react_django_nft_marketplace/frontend/frontend/node_modules/@usedapp/core/dist/esm/src/providers/transactions/reducer.js.map'
@ ./node_modules/@usedapp/core/dist/esm/src/providers/transactions/provider.js 8:0-47 23:46-64
@ ./node_modules/@usedapp/core/dist/esm/src/providers/DAppProvider.js 8:0-62 50:29-48
@ ./node_modules/@usedapp/core/dist/esm/src/providers/index.js 1:0-31 1:0-31
@ ./node_modules/@usedapp/core/dist/esm/src/index.js 2:0-28 2:0-28
@ ./src/App.tsx 5:0-54 11:30-42 13:24-37 13:39-54
@ ./src/index.tsx 7:0-24 11:33-36
102 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.68.0 compiled with 102 warnings in 2298 ms
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.
^C
mbp:frontend mac$我通过运行npx create-react-app frontend --template typescript命令创建了react应用程序。还有几乎与我的问题相同的。但它并没有解决。
发布于 2022-02-08 19:25:05
最近更新的0.11 of @usedapp/core库解决了这个问题。
发布于 2022-04-12 06:18:22
您应该尝试在根目录中创建一个.env文件(与package.json相同的文件夹),并在一行中设置GENERATE_SOURCEMAP=false:
GENERATE_SOURCEMAP=falsehttps://stackoverflow.com/questions/70986875
复制相似问题