Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

I have installed nodejs16 but still npm command it's not found

Comments

5 comments

  • cPRex Jurassic Moderator

    Hey there!  Can you share the exact commands you are using and what the error message is?

    0
  • dandumit

    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-cmd

     

    tried also :

    node -v
    bash: node: command not found

    Thank you,

    Daniel

     

     

     

    0
  • cPRex Jurassic Moderator

    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-usage

    so I can't say for sure where that npm error you're seeing is coming from.

    0
  • dandumit

    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
  • cPRex Jurassic Moderator

    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.