npm install 下载依赖报错解决方法

拉取项目下来后,下载依赖报错,如下:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @sentry/cli@1.72.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @sentry/cli@1.72.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.      

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Program Files\nodejs\node_cache\_logs\2022-04-28T08_47_23_030Z-d

根据报错可知,在下载依赖过程中,有一个包@sentry/cli@1.72.0下载不下来,网上查找资料:

文章链接:https://segmentfault.com/a/1190000008474798

解决方式:单独安装这个报错的包,加上参数:–ignore-scripts

npm i @sentry/cli@1.72.0 --ignore-scripts 

控制台显示@sentry/cli@1.72.0下载成功

 

再在终端npm i下载依赖就可以下载下来了

原理是什么我暂时不知道,要是知道后面我会在这里加上,有前辈知道请指教一下我,嘿嘿

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值