npm download error npm ERR! code ETIMEDOUT npm ERR! syscall connect npm ERR! errno ETIMEDOUT npm ERR! network re

1. The error message of npm download is as follows

insert image description here

2. I have tried many methods of searching on the Internet as follows (my failure does not mean that yours does not work, you can also try the following method)

1. Set the proxy to close

npm config set proxy false

2. Clear the cache

npm cache clean

But after I execute this sentence, the following error will be reported
insert image description here
3, and the following statement will be executed according to the blogger's writing

npm cache clean --force

The following results are displayed
insert image description here
and then it is said that the npm version is to be lowered

npm install npm@6.14.10 -g

Still getting an error! ! !
insert image description here

3. The final solution

1. View npm mirror settings

npm config get registry

2. Set npm as Taobao image

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

3. Check the npm mirror settings again

npm config get registry

The download is finally successful! !
insert image description here

Guess you like

Origin blog.csdn.net/m0_46695182/article/details/127846670