-
-
Notifications
You must be signed in to change notification settings - Fork 969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning | Error: ENOENT - Failed to parse source map | no such file or directory #396
Comments
same issue i use Typescript and React |
Description This is reproducible with initial javascript create react app and html5-qrcode version 2.2.0. To reproduce:
Expected behaviour No warning on compilation. Desktop
Logs
|
As mentioned by alspdx in create-react-app repo's issue.
The content of {
"version": 3,
"file": "camera.js",
"sources": [
"../../src/camera.ts" // here
],
...
} This is caused by webpack's source-map-loader package and it's advisable to not publish source map. {
"compilerOptions": {
"target": "es5",
"module": "ES2015",
"sourceMap": false, // here (original: true)
"moduleResolution": "Node",
...
}
} I've tried to disable source map in
|
.env
|
Solution found. Closing the issue. Solution
Thanks @d8corp and @nazebzurati |
Thanks! |
Thanks :) |
Thanks. I want to know how it happened and how did adding GENERATE_SOURCEMAP=false solved the problem? |
My Error: Failed to parse source map from 'C:\Users\samir\Desktop\My Learning\sso-auth-react\node_modules@auth0\auth0-react\dist\auth0-react.esm.js.map' file: Error: ENOENT: no such file or directory, open 'C:\Users\samir\Desktop\My Learning\sso-auth-react\node_modules@auth0\auth0-react\dist\auth0-react.esm.js.map' |
Hi @Sk47R I don't know how it happened. re: the sourcemap flag, I'd encourage you to read/research about source maps, understanding what's under the hood might bring some answers. |
Hello, @Gayatri19670 However, it seems that your post belongs somewhere else as you seem to be using a very different dependency in your learning project, the |
Thank you @raulra08 |
Thanks @raulra08 |
* feat: metamask did provider * fix: suppresing source map errors mebjas/html5-qrcode#396 (comment)
# [1.4.0](v1.3.0...v1.4.0) (2022-06-23) ### Features * metamask did provider ([#86](#86)) ([a2b87b7](a2b87b7)), closes [/github.com/mebjas/html5-qrcode/issues/396#issuecomment-1081661860](https:/mebjas/html5-qrcode/issues/396/issues/issuecomment-1081661860)
Sorry, but this doesn't look like a proper solution. Preventing the use of sourcemaps is not a solution, but just hiding the initial problem. |
Yes @titenis, I agree a better resolved it at its core than patched with a boolean value ;) |
Why create another issue? :)
|
Awesome!! thanks!! |
Please add |
Thank you for help, It worked |
Also, to remove warnings only for this package, you can add the following rule to the webpack config:
|
it works. But I'm not too fond of the way to fix the problem. it made me add another file named |
Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/format.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/format.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/index.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/lang/en_US.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/lang/en_US.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/lang/zh_CN.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/lang/zh_CN.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/realtime.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/realtime.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/register.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/register.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/utils/date.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/utils/date.ts' Failed to parse source map from '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/utils/dom.ts' file: Error: ENOENT: no such file or directory, open '/Volumes/Kavi/Projects/Project-Management-/client/node_modules/timeago.js/src/utils/dom.ts' |
Solution found. Closing the issue. Solution |
Describe the bug
Following the readme in the repository, I decided to implement the
Html5Qrcode
solution so that I can scan both in desktop and browser.Prior to that I did setup a ReactJS example application (using create react app) to implement the QR Code reader solution.
To Reproduce
Steps to reproduce the behavior:
npm install
npm start
Expected behavior
No warnings or errors when running the application.
Screenshots
N/A
Desktop:
Smartphone:
Additional context
The application in the repository is also not showing the camera stream in the mobile phone's browser
Logs
The text was updated successfully, but these errors were encountered: