Module Warning & Failed to parse source map error when used with Create React App v5.0.0 with Typescript
See original GitHub issueDescribe the bug I recently updated my project which uses CRA to v5.0.0. But when I start the project. I get the following warnings. Though tracking is working fine I just wanted to flag this warnings.
WARNING in ./node_modules/@datapunt/matomo-tracker-js/es/MatomoTracker.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/MatomoTracker.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/MatomoTracker.ts'
@ ./node_modules/@datapunt/matomo-tracker-js/es/index.js 1:0-44 3:15-28
@ ./node_modules/@datapunt/matomo-tracker-react/es/instance.js 1:0-56 4:13-26
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 3:0-55 3:0-55
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-js/es/constants.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/constants.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/constants.ts'
@ ./node_modules/@datapunt/matomo-tracker-js/es/MatomoTracker.js 12:0-42 183:15-38 202:15-39 216:25-47 223:13-35 268:13-46 276:25-64
@ ./node_modules/@datapunt/matomo-tracker-js/es/index.js 1:0-44 3:15-28
@ ./node_modules/@datapunt/matomo-tracker-react/es/instance.js 1:0-56 4:13-26
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 3:0-55 3:0-55
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-js/es/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/index.ts'
@ ./node_modules/@datapunt/matomo-tracker-react/es/instance.js 1:0-56 4:13-26
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 3:0-55 3:0-55
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-js/es/types.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/types.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-js/src/types.ts'
@ ./node_modules/@datapunt/matomo-tracker-js/es/index.js 2:0-33 4:0-17
@ ./node_modules/@datapunt/matomo-tracker-react/es/instance.js 1:0-56 4:13-26
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 3:0-55 3:0-55
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-react/es/MatomoContext.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/MatomoContext.tsx' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/MatomoContext.tsx'
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 1:0-59 1:0-59
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-react/es/MatomoProvider.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/MatomoProvider.tsx' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/MatomoProvider.tsx'
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 2:0-61 2:0-61
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-react/es/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/index.ts'
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-react/es/instance.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/instance.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/instance.ts'
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 3:0-55 3:0-55
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-react/es/useMatomo.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/useMatomo.ts' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/useMatomo.ts'
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 4:0-51 4:0-51
@ ./src/index.tsx 24:0-64 52:33-47
WARNING in ./node_modules/@datapunt/matomo-tracker-react/es/utils/useOutboundClickListener.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/utils/useOutboundClickListener.tsx' file: Error: ENOENT: no such file or directory, open '/Users/nick/project-cra-5/node_modules/@datapunt/matomo-tracker-react/src/utils/useOutboundClickListener.tsx'
@ ./node_modules/@datapunt/matomo-tracker-react/es/useMatomo.js 3:0-72 14:6-30
@ ./node_modules/@datapunt/matomo-tracker-react/es/index.js 4:0-51 4:0-51
@ ./src/index.tsx 24:0-64 52:33-47
10 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.65.0 compiled with 10 warnings in 93372 ms
No issues found.
To Reproduce Steps to reproduce the behavior: Create a new project with create-react-app v5 with typescript Add Matomo dependencies Configure matomo instance yarn start / npm start
Also, you can fork from the sandbox and test it on your local https://codesandbox.io/s/7ner9
Expected behavior I think this warning should be fixed
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
After Upgrading to CRA 5.0 getting a lot of: Failed to parse ...
The best solution is to open a issue or pullrequest on that packages. The warnings are correct. These packages source maps pointing to...
Read more >Typescript CRA with MSW: failed to parse source map
I have created a Create React App application with ...
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 >To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly ... There might be new errors or warnings because...
Read more >4 warnings in child compilations (use 'stats.children: true' resp. '
Working in Vue to build a JavaScript application (Mathificent) , I get the following error; ERROR in Error: Child compilation failed: Module build...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Bump on this. Since updating to react-scripts 5, we’re enduring these Matomo warnings. Hope you can publish a fix soon!
I am working on publishing a new version, however since the municipality of Amsterdam has indicated that they no longer want to be involved in maintenance it will be published under my personal NPM account.