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

会有一股神秘感。 提交于 2019-12-24 02:01:08

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/14304639/should-i-install-npm-modules-for-meteor-in-usr-lib-or-usr-local

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!