I have installed nodejs16 but still npm command it's not found
I want to use MAutic application and on install he needs npm.
I have installed nodejs16 on easy apache but still when I am trying to install mautic complains that npm command not found
Please give me an ideea.
Thank oyu,
Danie
-
Hey there! Can you share the exact commands you are using and what the error message is?
0 -
Hello cPRex
composer update
............................................
> npm ci --prefer-offline --no-audit
sh: npm: command not found
Script npm ci --prefer-offline --no-audit handling the npm-ci event returned with error code 127
Script @npm-ci was called via post-update-cmdtried also :
node -v
bash: node: command not foundThank you,
Daniel
0 -
Thanks for the additional details. I confirmed that installing the nodejs16 package through EasyApache does not install the npm command on the system. Our NodeJS documentation also doesn't make mention of the npm command here: https://docs.cpanel.net/knowledge-base/web-services/how-to-install-a-node.js-application/
When running "composer update" on a default cPanel installation I see the following output:
# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Composer could not find a composer.json file in /root
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usageso I can't say for sure where that npm error you're seeing is coming from.
0 -
HEllo cPRex
Thank you for update. Could you please point me if there are other nodejsXX package will install npm executable ?
Or any documentation to install npm on an account ?
Thank you
Daniel
0 -
Can you run the following command on your server?
ls -lah
/opt/cpanel/ea-nodejs16/bin/
If that shows the npm command, you may just need to create an alias as outlined here:
https://stackoverflow.com/questions/71324859/bash-npm-command-not-found-in-cpanel-terminal
0
Please sign in to leave a comment.
Comments
5 comments