question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML files are removed from node_modules dependencies

See original GitHub issue

Hi!

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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ehmickycommented, Oct 25, 2019

Yes exactly @jarleriksen, that should work. Sorry for not suggesting that workaround in the meantime 😃

0reactions
ehmickycommented, Nov 28, 2019

@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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found