Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Not able to run global modules installed with 'n'

Not able to run global modules installed with 'n'

Problem

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.

Problem courtesy of: almypal

Solution

'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.

Solution courtesy of: ming_codes

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Not able to run global modules installed with 'n'

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×