iopwet.blogg.se

Npm config set
Npm config set












npm config set npm config set

npm config set and npm config set -g only allow you to edit two of those four kinds of files I agree that if npm is going to support per-package configuration, it should be configurable via the CLI. npmrc at ”$(pwd)/.npmrc”, a per-user file at ”$HOME/.npmrc” (what calls “the global config”), a global file installed at ”$(npm -g prefix)/etc/npmrc”, and a special “ npmrc” bundled into the CLI package itself (used to ensure that things stay installed in the correct places on Windows). npmrc files evaluated by npm's configuration framework: a per-package. There are actually four different kinds of.The value has come from ~/.npmrc despite appearances (I double-checked the value in the new NPMRC is definitely thought this might be a bug in NPM so I upgraded my Node/NPM to the latest version, but it still behaves the same way.There's even more going on in this issue than there appears at first: "npm config ls -l" to show all defaults. node bin location = C:\Program Files\nodejs\node.exe Userconfig = "C:\path\to\another\directory\.npmrc" userconfig C:\path\to\another\directory\.npmrc Even more strangely, npm config list contains a userconfig header (semicolon-prefixed line) specifying my new location, but the contents come from ~/.npmrc.įor example, if I set my email as in the ~/.npmrc and as in my new NPMRC, npm config list reports something like this: cli configs Now NPM ignores any properties I put into my new NPMRC file and only takes properties from ~/.npmrc. This doesn't make sense to me - seems NPM needs to know where the user config is in order to find out where it is! To my surprise, NPM added a new entry userconfig into my existing user config at ~/.npmrc. Npm config set userconfig C:\path\to\another\directory\.npmrc. I had a load of stuff in my user config which I didn't want to interfere with for my main project, but I was switching to a second project which required different configuration, so I just did: By default, NPM stores the user config in ~/.npmrc.














Npm config set