https://registry.npm.taobao.org/@smallwei%2favue: tunneling socket could not be established, cause=c

前端运行项目时报错:

error An unexpected error occurred: "https://registry.npm.taobao.org/@smallwei%2favue: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:8080".

在这里插入图片描述
尝试过

切换淘宝源:yarn config set registry https://registry.npm.taobao.org/
删除代理配置:npm config set http-proxy null
			 npm config rm https-proxy
			 yarn config delete proxy
			 npm config rm proxy
删除node-module包:rimraf node_modules  
清除缓存:npm cache clean --force 
		 npm cache verify 	

每一个操作过后重新npm install或者yarn都不行,还是会报错, 用npm install不报错,但在npm run dev的时候会报错:
在这里插入图片描述
yarn 的时候会报错:
在这里插入图片描述
在上述方法都试过之后,我又尝试了一遍 yarn install, 然后就可以成功运行了。

PS: 我不知道出错的是什么,只知道代理问题,上述方法不知道是哪个起了作用,可以都尝试一下,最后,希望每次尝试后用npm install 和yarn install 都试一下能不能运行

猜你喜欢

转载自blog.csdn.net/qq_51741730/article/details/128368257