Skip to content
Advertisement

Node.js installation error

I have installed Node.js, NVM and NPM according to : https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server

My working directory looks like this:

Working_FilesWebRTC which contains the files:

  • package.json
  • server.js

and

Working_FilesWebRTCviews which contains an index file:

index.ejs

In Working_FilesWebRTC, in order to run the server, using:

  node server.js

every time I have to repeat the process explained in the installation, otherwise I receive the error:

 node server.js 
 The program 'node' can be found in the following packages:
  * node
  * nodejs-legacy
  Try: sudo apt-get install <selected package>

where the error does stand please?

Thank you

Advertisement

Answer

Try this: sudo ln -s "$(which nodejs)" /usr/bin/node

And run again node server.js

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement