1

生产服务器出现问题:

/data/cc/jenkins/workspace/workspace/new_ccas/ccas-ui
+ yarn
yarn install v1.22.11
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.npmjs.org/@xview-ui/admin-core/-/admin-core-2.0.0.tgz: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:1080".

然后通过:
通过 yarn config get registry 确认,没有设置淘宝镜像。

但是为啥通过 yarn 命令安装项目依赖后,生成的 yarn.lock 文件里看到的依然是 https://registry.npm.taobao.o... 呢。如图:
image.png

网上很多答案都说是代理问题,不过,设置了代理还是提示这个,后来删除了 yarn.lock 文件后重新 yarn 就好了。估计是 yarn.lock 中包的路径有错,所以一直加载失败。出现此问题可能是 npm 和 yarn 混用导致的。当然,也有可能真的是网络问题。
删了 yarn.lock 文件依然无效可以试下设置代理镜像。

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

startshineye
91 声望26 粉丝

我在规定的时间内,做到了我计划的事情;我自己也变得自信了,对于外界的人跟困难也更加从容了,我已经很强大了。可是如果我在规定时间内,我只有3分钟热度,哎,我不行,我就放弃了,那么这个就是我自己的问题,因为你自己...


« 上一篇
ES添加新字段
下一篇 »
es常见查询