Operating System & Version
CENTOS 7.9
cPanel & WHM Version
94.0.4

PostAlmostAnything

Active Member
Mar 3, 2020
36
0
6
Portland, Oregon
cPanel Access Level
Website Owner
I am trying to install NPM for a Node.js application. I have already registered the app using Application Manager and uploaded my package.json file to the application directory. I tried running Ensure Dependencies but got an error saying to run the following command:

cd /home/username/public_html/example.com/app && /opt/cpanel/ea-nodejs10/bin/npm install

I logged into SSH and pasted that command, but instead of installing the node modules specified in package.json I got the following:

npm WARN lifecycle npm is using /opt/cpanel/ea-nodejs10/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> [email protected] install /home/username/public_html/example.com/app/node_modules/puppeteer
> node install.js

sh: node: command not found
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-03-27T06_21_36_620Z-debug.log


I am not sure how to access the above log file because WHM does not have a file manager like cpanel does so I can't simply click on a folder and navigate to it.

UPDATE: This problem seems isolated to Puppetter. When I try to run npm i puppeteer after installing all other modules I get the error.
 
Last edited:

PostAlmostAnything

Active Member
Mar 3, 2020
36
0
6
Portland, Oregon
cPanel Access Level
Website Owner
Here is someone else with the problem who doesn't appear to have solved it as far as I can tell Need help installing puppeteer · Issue #3107 · puppeteer/puppeteer

One person on that thread said the problem is from puppeteer not downloading chromium. That would make sense because I was told by a shared host whose service I couldn't use that root access was needed to use puppeteer. I have root access, so I am not sure what the problem is. Do I have to install Chromium somehow on my own before installing Puppeteer?
 
Last edited: