Support Forums

Build is stuck on installing rpm node modules. NPM run build works locally

NPM version : 7.21.1
Node version: 16.4.2

I have taken all the necessary steps to troubleshoot this issue. I have checked my npm version and set it as the latest 7.21.1. This site uses 7.21.0. I am able to run npm run build locally and the react-based node site builds with no issues. All npm packages get installed successfully locally. I am not sure what to look at that would be causing this issue. Any guidance would be greatly appreciated.

I have looked over the package Json file. I have made sure I only have one lock file. I have also tested deploying in Heroku and a simular result happens being stuck on the npm packages.

For more info: node.js - Why is Heroku stuck on installing node modules on initial build? - Salesforce Stack Exchange.

Hi @bholsinger09

Can you post a deploy log showing where the build got stuck?

This is the deploy log:

If you look at the line after the one you pointed to it says

Build exceeded maximum allowed runtime.

In other words your build took too long and did not complete. 15 minutes is the default.

Thanks for that documentation. I have taken all the necessary steps to troubleshoot this minus downloading the Docker environment to match what Netlify is doing locally. I understand it is timing out, however, I don’t understand why it is timing out. I understand the limitation of 1 gb, what I don’t understand is why I am reaching those limitations. This is a small node project with very few components and dependencies.

I am going to provide some more screenshots and any other pointers would be greatly appreciated.

This shows the corrected variables and version control.

This is the package.json file showing the small number of dependencies.

Also if it helps here is a screen shot of the build in terminal locally. Note the small file sizes .

While it won’t break the building of your project, the homepage set in the package.json will make the site fail when published as you may note from the last screenshot which says

The project was built assuming it is hosted at /bholsinger09/Hookahhouse/

which is not the case if you are hosting it on Netlify.

I can see nothing obvious that may cause the build to timeout. If you can share your git repository, I can test and share my findings.

Thanks and yes you make a good point about the homepage. I will fix that. Here is my git repository : https://github.com/bholsinger09/Hookahhouse. Let me know what you might find. Thanks a lot.

Woah. I tried doing an NPM install and NPM hung. I had to kill -9 it in another window.


I don’t know what that means exactly, but definitely wasn’t expected. I’ll see if I can find the NPM logs or something.

No logs are being written. Even when trying npm install --timing from Generating and locating npm-debug.log files | npm Docs

@bholsinger09 Had some issue @aakoch mentioned with idealTree:Hookahhouse.

  • Remove the package-lock.json.
  • Remove "homepage" from package.json.
  • Deploy: https://hungry-mcnulty-8023b7.netlify.app

My fork: https://github.com/coelmay/Hookahhouse

1 Like

Thanks everyone. Any help on this matter is grateful.

I deleted package-lock.json and was able to run the install.

1 Like

Thanks. Seriously I would have never known it was the lock file. Thanks a bunch