Npm install stays in fetchMetadata: sill mapToRegistry all the time.

when npm install, first of all, the Times mistakenly exceeded the maximum memory. It probably means that when I reinstall version 4.6.1 of npm, and re-install, I always stay in the place of fetchMetadata: sill mapToRegistry xxxxurl. After three hours, there is no success in Install. The answer on the Internet is to switch to Taobao image address. My npm source has always been Taobao image address. How to solve this problem?

Aug.23,2021

is mostly due to network problems . Try yarn . Portal


you can first check whether your source is the mirror source of Taobao

npm config get registry 

if not,
is replaced by the source of Taobao

npm config set registry https://registry.npm.taobao.org 

configure and then verify the success in the following ways

npm config get registry 

if this is not enough, use cnpm


npm install -g cnpm --registry=http://registry.npm.taobao.org

after installation, cnpm install

these two principles are actually the same

Menu