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

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.