useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

Failed to parse source map from ... Error: ENOENT: no such file or directory, open ...

Open Sevamove opened this issue 3 years ago • 11 comments

The issue #521 still reappears after the 0.11 update, but this time without >100 warnings.

Compiled with warnings.

Failed to parse source map from '/Users/mac/Desktop/react-django-nft-marketplace/react_django_nft_marketplace/frontend/frontend/node_modules/@metamask/detect-provider/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/mac/Desktop/react-django-nft-marketplace/react_django_nft_marketplace/frontend/frontend/node_modules/@metamask/detect-provider/src/index.ts'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

assets by path static/js/*.js 2.92 MiB
  asset static/js/bundle.js 2.92 MiB [emitted] (name: main) 1 related asset
  asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.92 KiB [emitted] 1 related asset
asset index.html 1.67 KiB [emitted]
asset asset-manifest.json 458 bytes [emitted]
cached modules 4.26 MiB (javascript) 31.5 KiB (runtime) [cached] 1227 modules

WARNING in ./node_modules/@metamask/detect-provider/dist/index.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/@metamask/detect-provider/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/mac/Desktop/react-django-nft-marketplace/react_django_nft_marketplace/frontend/frontend/node_modules/@metamask/detect-provider/src/index.ts'
 @ ./node_modules/@usedapp/core/dist/esm/src/helpers/injectedProvider.js 2:0-63 4:33-55
 @ ./node_modules/@usedapp/core/dist/esm/src/providers/injectedNetwork/provider.js 4:0-69 19:4-23
 @ ./node_modules/@usedapp/core/dist/esm/src/providers/injectedNetwork/index.js 2:0-27 2:0-27
 @ ./node_modules/@usedapp/core/dist/esm/src/providers/index.js 6:0-34 6:0-34
 @ ./node_modules/@usedapp/core/dist/esm/src/index.js 2:0-28 2:0-28
 @ ./src/App.tsx 6:0-54 9:30-42 11:24-37 11:39-54
 @ ./src/index.tsx 7:0-24 11:33-36

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.68.0 compiled with 1 warning in 2753 ms
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.
^C
(env) mbp:src mac$ 

Sevamove avatar Feb 09 '22 16:02 Sevamove

I remove latest version and install version 0.7.3 to by pass the error. Hope it useful for you.

akkien avatar Feb 24 '22 16:02 akkien

Looks like one of our dependencies, @metamask/detect-provider, didn't include the source code. Doesn't seem like the critical error though. Does it prevent you from building the app?

Also there's not much we can do from our side, consider opening an issue there https://github.com/MetaMask/detect-provider#readme

dmaretskyi avatar Apr 08 '22 15:04 dmaretskyi

@dmaretskyi According to metamask, they don't import index.ts.

https://github.com/MetaMask/detect-provider/issues/42

Ox54 avatar May 12 '22 23:05 Ox54

@vsevdrob Looks like a possible solution is:

This seems to be an issue of useDapp/[email protected]. Downgrading the package to v0.7.0 solves the problem.

Ox54 avatar May 12 '22 23:05 Ox54

still getting this error, prevents me from building the app in netlify

noodesonmars avatar May 20 '22 18:05 noodesonmars

Hi All, We have the same issue with our create-react-app. When running in localhost we get the following "Failed to parse source map from node_modules/@metamask/detect-provider/src/index.ts' file: Error: ENOENT: no such file or directory ..." but the Dapp runs perfectly fine

However when trying to deploy to Vercel (or similar) it becomes impossible because of this message

Entity54 avatar May 21 '22 13:05 Entity54

still getting this error, prevents me from building the app in netlify

I have the same problem. Is there no solution to fix this?

damdafayton avatar Jun 14 '22 14:06 damdafayton

still getting this error, prevents me from building the app in netlify

I have the same problem. Is there no solution to fix this?

Which version do you use?

mj426382 avatar Jun 15 '22 12:06 mj426382

I have installed latest react app using create-react-app, and installed latest useDapp version. But this error still appears on my side. Any solution?

icetrust0212 avatar Jun 20 '22 22:06 icetrust0212

Related: https://github.com/MetaMask/detect-provider/issues/42

rzadp avatar Aug 10 '22 10:08 rzadp

Promising update: https://github.com/MetaMask/detect-provider/issues/42#issuecomment-1215848244

rzadp avatar Aug 23 '22 11:08 rzadp