skip to Main Content

I have installed node.js on plesk onyx via the plesk extension manager. I am trying to install the node.js driver for mongodb. This is done via ssh using npm. However, no npm commands are being recognised.

Node.js is working as I have setup a test app successfully.

I am thinking that the way in which plesk installs node.js doesnt seem to allow for ssh npm access?
Can anyone shed any light on this please?

2

Answers


  1. Have you tried to use

    /opt/plesk/node/6/bin/npm

    or

    /opt/plesk/node/7/bin/npm

    command?

    Login or Signup to reply.
  2. Had the same issue, what i did was aquick find from ssh command line:

    find / -name npm
    

    Spotted the right npm in my environment:

    # find / -name npm
    /var/www/vhosts/mibro.help/.nodenv/shims/npm
    /opt/plesk/node/12/bin/npm
    

    And then use this path to run npm!

    Hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search