0

I'm trying to install ender.js. I've run the following command

 sudo npm install ender -g

but after the install (with no error), I can't access ender command line. I have the latest node and npm install (via brew)

anybody ran into this problem?

Yannick Schall
  • 32,601
  • 6
  • 29
  • 42
  • Does you path include the install folder for npm modules? – Chad Dec 18 '12 at 14:31
  • Not completely sure about how i should do that. I have bower and yeoman installed via npm (without sudo) and they work fine. Ender require sudo install but seems to install in `/usr/local/share/npm/bin/ender`. I have added this to my path but to no avail. – Yannick Schall Dec 18 '12 at 14:44
  • I was having something similar with node modules. In my case, adding ``/usr/local/share/npm/bin`` to my $PATH resolved the issue. When you ``echo $PATH`` do you see other node-related entries there? – Nick Tomlin Dec 18 '12 at 14:47

1 Answers1

1

you just need to add /usr/local/share/npm/bin to your path.

Try adding the following line to your bash profile (in ~/.profile, or ~/.bashrc, etc.):

PATH=$PATH:/usr/local/share/npm/bin

Then source the file to your current environment with . ~/.profile. And that should fix your issue.

Going forward, I would recommend using nvm to manage your node versions, and npm installs.

Chad
  • 19,219
  • 4
  • 50
  • 73