In Windows, I want to change the default global npmrc location, how can I do this?
Configure global nprmrc file location in Windows
Did you read docs.npmjs.com/configuring-npm/npmrc.html#per-user-config-file? –
Subtitle
Yes, I want to define global file , not per user. –
Amplifier
But the path you describe is to the per-user file. The global file is next one down in the linked docs. –
Subtitle
Where the global file is located in Windows? –
Amplifier
Looks like it's in AppData/Roaming by default: https://mcmap.net/q/265830/-nodejs-npm-global-config-missing-on-windows/3001761 –
Subtitle
So this is the problem I'm facing, AppData it's a folder inside C:\Users\<user>, I want the global .npmrc file to be elsewhere –
Amplifier
Does this answer your question? nodejs npm global config missing on windows –
Hop
Duplicate of https://stackoverflow.com/questions/15536872. Right? - Downvoting instead of flagging as duplicate is not very helpful, I think. –
Hop
I ran npm config set prefix C:\npm
to change the prefix of the global npmrc
location.
And then npm config get globalconfig
to get the exact expected global location (which is C:\npm\etc\npmrc
).
I navigated to this location and defined my global npmrc
there (I had to create the etc
folder myself.
© 2022 - 2024 — McMap. All rights reserved.