0

I'm trying to run node.js tutorials from NodeSchool, I've run the following commands:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
sudo apt-get install build-essential
sudo npm install -g javascripting
javascripting

(build-essential was already installed)

Now, after javascripting I get the following error message:

bash: /usr/local/bin/javascripting: No such file or directory

And when I do npm list -g I get a list that starts with the following:

/usr/lib
├─┬ javascripting@1.12.0

Which leads me to believe javascripting is there, but for some reason the terminal is not looking for globally defined commands, how can I get javascripting to run from the terminal as a global command?

Eduardo Wada
  • 103
  • 1
  • 3

1 Answers1

0

I figured it out just before posting the question so I thought I might just post the answer as well.

The reason my terminal is not searching for global commands is because I'm not running as administrator, sudo javascripting works.

Eduardo Wada
  • 103
  • 1
  • 3
  • This is why I can't stand the "official" Node installation instructions for Ubuntu. You shouldn't have to (or want to) run third-party node modules with admin privileges. I strongly recommend [installing Node with nvm](http://askubuntu.com/a/531943/2079). – Michael Martin-Smucker May 26 '15 at 16:49