I want to install packages locally, but npm is always installing packages to the global location. I'm running the following command:
npm install serialport
I do not have a .npmrc command and I'm not using the -g flag, so I don't know why it's not installing locally. Here's a snippet from the config dump showing that global is false: $ npm config ls -l | grep global global = false globalconfig = "/usr/local/etc/npmrc" globalignorefile = "/usr/local/etc/npmignore"
And the packages are still being installed like this
serialport@0.7.3 ../../../../node_modules/serialport
So unless I am totally wrong about what "local" means, this seems wrong. I was under the impression that "local" meant in the current working directory so that I could do a "require" in my main code file. See: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ as referenced in a previous npm related question.
Can someone please give me some hints on this? Thank you very much.
P.S. It's not specific to the serialport module. It's happening with all of them.