Contents
Usually the install progresses and then stops dead with one line in the terminal: Killed. Sometimes you get npm ERR! code ENOMEM or signal SIGKILL instead, or a generic error after clicking Run NPM Install in cPanel. The code isn’t the problem: the system stopped the process from outside because it went over the account’s limits.
Why it happens on hosting and not on your laptop
On shared hosting every account has a memory limit and a process limit through CloudLinux LVE. npm unpacks thousands of packages at once, some packages compile C++ through node-gyp, and some projects run a full build after installing. Your computer has far more memory, so you never notice.
Causes and fixes, in order
1. Development tools installed with runtime packages
Check: open package.json. If dependencies lists tools such as typescript, eslint, vite or @types/*, you’re installing things the app doesn’t need to run.
Fix: move development tools to devDependencies, then install production packages only over SSH inside the app’s environment (copy the command shown at the top of the app’s page in Setup Node.js App):
source /home/USER/nodevenv/myapp/24/bin/activate && cd /home/USER/myapp
npm ci --omit=dev --no-audit --no-fund
2. A postinstall script that builds the project
Check: look under scripts for postinstall or prepare running next build, vite build or tsc.
Fix: remove the build from those scripts, build locally or in CI, and upload the output. If the build itself is what dies, see Next.js build fails. prisma generate is light and can stay.
3. Packages compiled from source
Check: if you see gyp, make or g++ right before Killed, a package is compiling, for example bcrypt, canvas or sqlite3.
Fix: switch to an alternative that needs no compiling, such as bcryptjs instead of bcrypt, or one that ships prebuilt binaries, such as better-sqlite3.
4. A project too heavy for the account’s limits
Fix: bundle the Node.js server into a single file on your computer, so the server needs almost no node_modules:
npx esbuild server.js --bundle --platform=node --outfile=dist/server.js
Then set dist/server.js as the startup file. For Next.js, use output: "standalone".
A different error: a node_modules folder exists
If you uploaded node_modules from your computer, Run NPM Install refuses with a message saying the CloudLinux NodeJS Selector stores modules in a virtual environment and needs node_modules to be a symlink. Delete the folder from the app root and try again. If you then get Cannot find module, see Node.js module not found.
How to confirm it’s fixed
The install ends with a line such as added 214 packages, and the app starts after Restart. Resource Usage shows no new memory faults at install time.
Prevention
- Keep runtime packages and development tools apart from day one.
- Commit
package-lock.jsonand usenpm ci. - Build in CI and upload the output; don’t build on the production server.
On ArabyHost
On ArabyHost AI/Developer plans, Node.js 20 and 24 apps run through Setup Node.js App with SSH jailed in CageFS, and each account has memory and process limits set by its plan, so installing production packages only and building elsewhere helps. The Node.js deploy guide covers the full setup, and Araby AI reads the error log and explains the fix. If the app needs more resources, compare plans on the pricing page.
FAQ
Can I upload node_modules from my computer instead?
Not with Setup Node.js App: the selector keeps packages in a virtual environment linked in as `node_modules` and refuses to work when it finds a real folder with that name. Bundle the app into one file, or use Next.js standalone output, instead.
What's the difference between npm install and npm ci here?
`npm ci` installs exactly what `package-lock.json` lists without resolving versions again, so it is faster, lighter and repeatable. With `--omit=dev` it skips the development tools the app doesn't need to run.
How do I know it's the memory limit and not a broken package?
A package problem prints a clear message such as `ERESOLVE` or `404`; a limit shows up as `Killed`, `ENOMEM` or `SIGKILL` with no explanation. In cPanel, Resource Usage also shows memory faults at the same time.