Should I install npm modules for Meteor in /usr/lib or /usr/local?

Tag: node.js , meteor , npm Author: b5655885 Date: 2012-12-28

In Where do we put node modules we install by npm in a Meteor project?, the accepted answer indicates that you should install with this command:

cd /usr/local/meteor/lib/ && npm install

But process.env is telling me that $NODE_PATH is /usr/lib/meteor/lib/

Does this mean the correct place to install node modules (for local use, e.g. Chai) is now /usr/lib/meteor/lib/ instead of /usr/local/meteor/lib/?

Most of the questions about this are dated April/May '12, while in mid-June '12 it appears that a change was made to the way NODE_PATH was set. https://github.com/meteor/meteor/commit/b7632579296257c10bf640a5f00716c3d440de71

Have you just tried either of them? What happens?

Other Answer1

.meteor/local/build/server/node_modules is a symbolic link to the directory you need to install the module in.