patalmypal
patalmypal

Reputation: 6712

Not able to run global modules installed with 'n'

Have installed Node version manager 'n'.

Installed 'mocha' using

n npm 0.6.4 install mocha -g.

Now when I try to access it using

mocha -R spec

I get an error 'command not found'. Is there some option I'm missing.

Upvotes: 0

Views: 518

Answers (1)

ming_codes
ming_codes

Reputation: 2922

'n' is the version manager and not the package manager. In other words, you use 'n' to install different versions of NodeJS. You'll use npm to install packages like mocha.

Type n 0.6.4 will install NodeJS version 0.6.4 and set it in your path.

Type npm install mocha -g will install mocha as global module.

Run both the above commands in order, then you'll find mocha in your path.

Upvotes: 2

Related Questions