How does npm restore default settings

I learned to install npm according to some tutorials before, and set up, for example:

npm config set prefix或npm config set cache

But because I don't know npm very well, I can't find the installed command when using the terminal, and I want to restore the default value.

the way is:

Delete the .npmrc file

His location can be entered in the terminal: npm config ls
 

Find the path of userconfig, rm -rf will do it, then your npm will be normal

Guess you like

Origin blog.csdn.net/m0_59338367/article/details/126998066