.npmrc file in project directory and in user directory

39 Views Asked by At

i work on several projects, for most of them i need the same .npmrc file, but for one of them i need different .npmrcfile. i configure .npmrc in my user folder ('C:/Useres/me/.npmrc') and all the projects work fine, in the one project i configure the .npmrc local in the project directory, but it wont work, because it still looking into .npmrc that i have in my user directory.. how can i configure the one project to use .npmrc locally ? it's suppose to be the default behavior but it wont work and that's what i get in the one project with the local .npmrc:

npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:

thank you!

1

There are 1 best solutions below

0
engForLife On

i did a work around by explictly mention: npm ci --userconfig=.\.npmrc