Can someone please tell me what the recommended way to use a node.js package that one would install with npm locally (npm without -g option)?
One way someone recommended was:
% cd myapp/.meteor/local/build/server/
% npm install aws-lib
npm http GET https://registry.npmjs.org/aws-lib
npm http 304 https://registry.npmjs.org/aws-lib
npm ERR! Could not create /home/user/myapp/.meteor/local/build/server/node_modules/___aws-lib.npm
This fails because myapp/.meteor/local/build/server/node_modules is symlinked to /usr/lib/meteor/lib/node_modules/.
I want to install it locally for a several reasons. I want it to be portable as in, if I deploy the app somewhere else, I want all the dependencies to travel with it. I don't want to do this as root. It seems wrong to install stuff like this into /usr/lib/meteor.