Error: ENOENT: no such file or directory for /node_modules/html-to-image/src/applyStyleWithOptions.ts'
See original GitHub issueExpected Behavior
When i install the html-to-image package via npm, it should come with the src folder, which it doesnt, unless i’m doing something wrong
The html-to-image package should come with the src folder when insalled via npm
Current Behavior
Error: ENOENT: no such file or directory in /node_modules/html-to-image/src/applyStyleWithOptions.ts’
The src folder is not found, hence the ENOENT error
Possible Solution
Update the npm package to include the src folder instead of me having to manually transfer it to the node_modules folder for the package to work
Steps To Reproduce
- Install html-to-image npm package in React js project
- Use the package in your project to snapshot a HTML element via the cliient-side (in any way whatsoever)
- Run the project
Error Message & Stack Trace
<!-- Provide a log message if relevant -->
WARNING in ../node_modules/html-to-image/es/cloneNode.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/tmp/build_5d01cf99/node_modules/html-to-image/src/cloneNode.ts' file: Error: ENOENT: no such file or directory, open '/tmp/build_5d01cf99/node_modules/html-to-image/src/cloneNode.ts'
Additional Context
Your Environment
Ran the package in React js client side while trying to convert HTML element toPng Also ran the project in Heroku environment through connection via Github, the problem reoccurs in the same manner in both environments
- html-to-image: [1.9.0]
- OS: [e.g. Windows 10]
- Browser: [e.g. Mozilla 97.0.2]
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:21 (5 by maintainers)
Top Results From Across the Web
How to resolve Nodejs: Error: ENOENT: no such file or directory
Your app is expecting to find a file at /home/embah/node/nodeapp/config/config.json but that file does not exist (which is what ENOENT ...
Read more >Error: ENOENT: no such file or directory, open 'libtaos.so' #2255
This isn't a td-connector issue by the way, it just depends on the permissions set for the libtaos.so and other files.
Read more >Error: ENOENT: no such file or directory, scandir ... - YouTube
nodejsError: ENOENT : no such file or directory, scandir '**/node_modules/node-sass/vendor' | Module build failed (from .
Read more >How to fix: npm ERR! enoent ENOENT: no such file or ...
If you ever get this error, the hotfix is to follow these steps: delete node-modules folder; run command npm cache clean --force; run...
Read more >ENOENT: no such file or directory" (Doc ID 2895246.1)
Visual Builder Studio - Version 20.10 and later: When Selecting "Optimize Application" VBS Package Job Fails With "Error: ENOENT: no such ...
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 FreeTop 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
Top GitHub Comments
Replace line from package.json inside scripts,
"start": "GENERATE_SOURCEMAP=false react-scripts start"
or
Paste line inside .env file,
GENERATE_SOURCEMAP=false
It works for me. Thanks.
^ experiencing this issue as well, it seems as if #316 would fix it, hoping that can be merged.