Failed to parse source map

Viewed 19168

I created an npm library with rollup. Then, I install and use it in a React project. When i npm start the project it throw me this line:

Failed to parse source map from 'C:\Users\XXXX\Desktop\example\node_modules\@AAA\BBB\src\components\Button\Button.tsx' file: 
Error: ENO ENT: no such file or directory, open 
'C:\Users\XXXX\Desktop\example\node_modules\@AAA\BBB\src\components\Button\Button.tsx' 

This is like a warning more like an error because the button works and webpack says me "No issues found."

In the node_modules folder I have the @AAA/BBB folder with /dist/cjs and /dist/esm. I dont know what can produce the search in /src in the node modules.

Thank you for your time <3

2 Answers

If you want to disable sourcemap locally only, you can disable it inside your local yarn or npm script.

 "scripts": {
    "start": "GENERATE_SOURCEMAP=false react-scripts start",

Now, source map is disabled only when you are running the app locally.

Related