HTML files are removed from node_modules dependencies
See original GitHub issueHi!
I am not exactly sure this is the place to report this.
I started using Netlify Functions where I have a function that runs Google Lighthouse.
I started getting this error:
Error: ENOENT: no such file or directory, open '/var/task/node_modules/lighthouse/lighthouse-core/report/html/report-template.html'
Using Netlify CLI I ran netlify functions:build and inspected the zip file it returned, to see that all the html files from node_modules/lighthouse folder has been removed by the build.
I looked at the code for the functions:build command and it led me to here.
I am not getting this error when running netlify dev so I assume that it doesn’t zip the functions.
I might be doing something wrong here and would love an answer.
Thanks a lot!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to clean node_modules folder of packages that are not in ...
As far as I know, in new NPM version, all the dependencies are located at the root node_modules folder, and not as before,...
Read more >Understanding dependency management with Node Modules
JavaScript modules are simply script files which can be loaded into each other to ... or delete the lock file and reinstall your...
Read more >How to clean node modules folder of packages that are not in ...
This would erase all installed packages in the current folder and only install the dependencies from package.json. If the dependencies have been ...
Read more >electron-packager is not bundling the Node modules listed in ...
I was under the impression that electron-packager would bundle anything listed in dependencies in package.json . Do I need to manually copy ...
Read more >Dependencies | rules_nodejs - GitHub Pages
On persistent CI machines, that will delete the node_modules folder when cleaning the clone between jobs, the repository rule will run for every...
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

Yes exactly @jarleriksen, that should work. Sorry for not suggesting that workaround in the meantime 😃
@jarleriksen you should now be able to access the fix I was mentioning above by signing up to the new Build beta if you wanted to give it a shot 😃