在线求助。。npm i 报错,连公司内部网,无法连外网

各位前端朋友 ,有没有遇到我这种npm i 报错的问题。

公司内网,无法连外网,使用公司内部的Nexus镜像源

我在公司内网执行npm i 报错,报network连接失败。

我都已经在npm设置了内部镜像源,它为啥还要去外网下载呢。而且内部镜像源有npm-8.3.1.tgz这个包。

(同样的代码,我拿到外网就能执行成功,并且能启动起来)

bash 复制代码
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
相关推荐
洛小豆27 分钟前
深入理解Pinia:Options API vs Composition API两种Store定义方式完全指南
前端·javascript·vue.js
洛小豆36 分钟前
JavaScript 对象属性访问的那些坑:她问我为什么用 result.id 而不是 result['id']?我说我不知道...
前端·javascript·vue.js
叹一曲当时只道是寻常40 分钟前
Softhub软件下载站实战开发(十六):仪表盘前端设计与实现
前端·golang
超级土豆粉1 小时前
npm 包 scheduler 介绍
前端·npm·node.js
bug爱好者1 小时前
原生小程序如何实现跨页面传值
前端·javascript
随笔记1 小时前
uniapp开发的小程序输入框在ios自动填充密码,如何欺骗苹果手机不让自动填充
前端·ios·app
bug爱好者1 小时前
原生微信小程序最实用的工具函数合集
前端·javascript
3Katrina1 小时前
JS事件机制详解(2)--- 委托机制、事件应用
前端·javascript·面试
Allen Bright1 小时前
【CSS-15】深入理解CSS transition-duration:掌握过渡动画的时长控制
前端·css
张鑫旭1 小时前
40岁老前端2025年上半年都学了什么?
前端