react-blurhash
react-blurhash copied to clipboard
Failed to parse source map from '../node_modules/react-blurhash/src/Blurhash.tsx' file
Hi, I used react-blurhash and when I start my project I am getting this error messages:
WARNING in ./node_modules/react-blurhash/es/Blurhash.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/BeerCoder/MyProject/store/node_modules/react-blurhash/src/Blurhash.tsx' file:
Error: ENOENT: no such file or directory, open '/home/BeerCoder/MyProject/store/node_modules/react-blurhash/src/Blurhash.tsx'
@ ./node_modules/react-blurhash/es/index.js 1:0-49 1:0-49
@ ./src/index.tsx 9:0-39 29:0-4
WARNING in ./node_modules/react-blurhash/es/BlurhashCanvas.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/BeerCoder/MyProject/store/node_modules/react-blurhash/src/BlurhashCanvas.tsx' file: Error: ENOENT: no such file or directory, open '/home/BeerCoder/MyProject/store/node_modules/react-blurhash/src/BlurhashCanvas.tsx'
@ ./node_modules/react-blurhash/es/index.js 2:0-61 2:0-61
@ ./src/index.tsx 9:0-39 29:0-4
WARNING in ./node_modules/react-blurhash/es/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/BeerCoder/MyProject/store/node_modules/react-blurhash/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/BeerCoder/MyProject/store/node_modules/react-blurhash/src/index.ts'
@ ./src/index.tsx 9:0-39 29:0-4
I am using:
"react": "^18.2.0",
"react-blurhash": "^0.1.3",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"typescript": "^4.7.4",
This seems to be some error in the package? @nygardk @muescha
As per this issue,
Adding GENERATE_SOURCEMAP=false
to .env
worked for me.
Thanks but this doesn't look like a proper solution. Preventing the use of sourcemaps is not a solution, but just hiding the initial problem.
I believe there are two ways to fix this:
- disable sourcemap generation in this package
- publish source code with dist files, so that source files could be actually found as the error suggests
It seems that this package may ship miss-configured sourcemaps, that interrupts the build. According to CRA, sourcemaps should be fixed in this package and those errors are the packages fault https://github.com/facebook/create-react-app/discussions/11767#discussioncomment-1969071
Hey @nygardk @Thisen any chance for fixing this in the future? :)
Hey @nygardk @Thisen any chance for fixing this in the future? :)
Does the problem exist for 0.2.0
?
Hey @Thisen, I am using 0.2.0
and I am getting the same error. I would say that the problem still exists with this version as well.
Hey @nygardk @Thisen any chance for fixing this in the future? :)
Does the problem exist for
0.2.0
?
Yes it is still there in v 0.2.0
After some googling it seems that this package may ship miss-configured sourcemaps, that interrupts the build. According to CRA, the sourcemaps should be fixed in the package and those errors are the packages fault: https://github.com/facebook/create-react-app/discussions/11767#discussioncomment-1969071
I am facing the same issue. Would there be an update to solve the said problem?
Please try out 0.3.0
.
If that doesn't fix the issue, please reopen the issue.
Hmm I tried it and it seems the issue still exists.
Iam having this same issue in a React-Typescript project while trying to use a package, but the package is working fine if I close the errors in the browser,but the error message continues on the terminal. I tried giving GENERATE_SOURCEMAP=false in the .env file in same folder as the package.json but it is still showing the error .Is there a way around this or why this particular error is popping up ?
@Thisen it seems this isnt fixed, I cant reopen though