各位前端朋友 ,有没有遇到我这种npm i 报错的问题。
公司内网,无法连外网,使用公司内部的Nexus镜像源
我在公司内网执行npm i 报错,报network连接失败。
我都已经在npm设置了内部镜像源,它为啥还要去外网下载呢。而且内部镜像源有npm-8.3.1.tgz这个包。
(同样的代码,我拿到外网就能执行成功,并且能启动起来)
E:\work\testinstall\test>npm i
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmmirror.com/npm/download/npm-8.3.
1.tgz failed, reason: connect ETIMEDOUT 220.181.125.241:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\KF6798\AppData\Local\npm-cache\_logs\2023-08-21T14_05_01_5
66Z-debug-0.log