Reputation: 981
I am trying to install meteorite
MacBook-Air-Voldemar:packages voldemar$ sudo npm install -g meteorite
Password:
and I am getting error
sudo: npm: command not found
How to solve this problem?
Upvotes: 3
Views: 2811
Reputation: 75985
Node already has a node js package for OS X.
Goto http://nodejs.org and press install to download the nodejs package, when installed npm should be installed with it.
Upvotes: 4
Reputation: 1825
The message says that you have not installed the node package manager npm
.
Before installing npm, make sure you have noted down the path to node. It is most probably in /usr/local/lib/node
.
Then do,
git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
Now add the path to node, by adding the following in .bashrc
export NODE_PATH = "/path/to/node"
You will also need the npm
executable, so add the path to npm bin,
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin:$PATH"
Then save and exit .bashrc
and do
source ~/.bashrc
This evaluates the edits and the changes reflect in the shell. Now you can go ahead with sudo npm install -g meteorite
Upvotes: 2