question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to parse source map from [...]/providers/transactions/reducer.ts

See original GitHub issue
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 '[project]/node_modules/@usedapp/core/src/providers/transactions/reducer.ts' file: Error: ENOENT: no such file or directory, open '[project]/node_modules/@usedapp/core/src/providers/transactions/reducer.ts'
 @ ./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 67:31-50
 @ ./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 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149
 @ ./src/index.js 8:0-63 12:19-34 14:5-20 15:5-20 21:33-45

I get this error whenever I use any version >0.7.0. It’s a warning so it does compile, but it then causes a lot of issues like unexpectedly reverted calls even though they work using the same provider, and many many invalid hash errors that bugs out my project.

image

Using webpack 5.72.0.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
noodesonmarscommented, Apr 19, 2022

same issue here, seems to be preventing useEthersBalance or any hook from working, makes entire package faulty, yarn create react-app projectName --template typescript, react: ^18.0.0, @usedapp/core: ^1.0.0

I fixed it by downgrading useDapp to ^0.11.0, and adding a .env file with GENERATE_SOURCEMAP=false file to the main directory of the project. works for now

1reaction
chand1012commented, Apr 15, 2022

I’m having the same issue on @usedapp/core versions 1.0.0 and 0.12.9. Using CRA Typescript template.

WARNING in ./node_modules/@usedapp/core/dist/esm/src/providers/transactions/context.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from './node_modules/@usedapp/core/src/providers/transactions/context.ts' file: Error: ENOENT: no such file or directory, open './node_modules/@usedapp/core/src/providers/transactions/context.ts'
 @ ./node_modules/@usedapp/core/dist/esm/src/providers/index.js 6:0-64 6:0-64
 @ ./node_modules/@usedapp/core/dist/esm/src/index.js 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149
 @ ./src/index.tsx 9:0-45 16:33-45

WARNING in ./node_modules/@usedapp/core/dist/esm/src/providers/transactions/model.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from './node_modules/@usedapp/core/src/providers/transactions/model.ts' file: Error: ENOENT: no such file or directory, open './node_modules/@usedapp/core/src/providers/transactions/model.ts'
 @ ./node_modules/@usedapp/core/dist/esm/src/providers/index.js 8:0-37 8:0-37
 @ ./node_modules/@usedapp/core/dist/esm/src/index.js 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149
 @ ./src/index.tsx 9:0-45 16:33-45

WARNING in ./node_modules/@usedapp/core/dist/esm/src/providers/transactions/provider.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from './node_modules/@usedapp/core/src/providers/transactions/provider.tsx' file: Error: ENOENT: no such file or directory, open './node_modules/@usedapp/core/src/providers/transactions/provider.tsx'
 @ ./node_modules/@usedapp/core/dist/esm/src/providers/DAppProvider.js 8:0-62 67:31-50
 @ ./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 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149
 @ ./src/index.tsx 9:0-45 16:33-45

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 './node_modules/@usedapp/core/src/providers/transactions/reducer.ts' file: Error: ENOENT: no such file or directory, open './node_modules/@usedapp/core/src/providers/transactions/reducer.ts'
 @ ./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 67:31-50
 @ ./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 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149 3:0-149
 @ ./src/index.tsx 9:0-45 16:33-45

It looks like including the source code in your distribution would be an easy, albeit temporary, fix for this issue while a better solution is came up with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to parse source map... Error: ENOENT: no such file or ...
I've created the react app by running npx create-react-app frontend --template typescript command. There is also almost the same issue as of my....
Read more >
Failed to parse source map warnings - Dynamic Docs
If using create-react-app v5, you may see some warnings (although they appear like errors) when running/building your react application.
Read more >
source-map-loader - webpack
Extracts source maps from existing source files (from their sourceMappingURL ). ... ignoreWarnings: [/Failed to parse source map/], };.
Read more >
Fixing sourcemap errors in Webpack 5 - Ionic React
[react-scripts] Failed to parse source map from '/home/anon/d/ionic/node_modules/@capacitor/app/src/definitions.ts' file: Error: ENOENT: no ...
Read more >
Google Chrome DevTools failed to parse SourceMap
Advice? DevTools failed to parse SourceMap: chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/sourcemaps/onloadwff.js.map DevTools failed to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found