yarn install报错:error Couldn‘t find package “fsevents@~2.3.2“

问题描述

执行yarn install时报错:

error Couldn't find package "fsevents@~2.3.2" required by "chokidar@^3.4.2" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

解决方案1

yarn --registry=https://registry.npmmirror.com

结果:无法解决问题,始终显示:

[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...

解决方案2 

rm yarn.lock
yarn cache clean
yarn install

在yarn install时再次遇到问题:

[1/4] Resolving packages...
error Error: certificate has expired
    at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket._finishInit (node:_tls_wrap:959:8)
    at ssl.onhandshakedone (node:_tls_wrap:743:12)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

执行以下命令:

yarn config set strict-ssl false

再次执行yarn install,成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值