There is a file in the root directory of some projects .npmrc
, and there is only one sentence when you click it:
registry=http://registry.npm.xxxx.com
The function is to set the mirror address npm
of the warehouse .
npm i
In , if there is this file in the root directory of the project, it will be automatically installed from this mirror address node_modules
, and there is no need to manually set the mirror address.