"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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |