npm报错之package-lock.json found. 问题和淘宝镜像源过期问题

图片来源网络,详细信息不详,仅供欣赏

1、package-lock.json found. 问题的解决

在执行yarn add react-transition-group -S 安装react-transition-group时出现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 unsynchroniemove package-lock.json是由于在项目中同时存在 package-lock.json 和 yarn.lock 锁定文件,可能会导致版本冲突和依赖不一致的问题。package-lock.json 是 npm 安装依赖时自动生成的,相应地yarn.lock 是使用 yarn 安装依赖时生成的。
为了避免上述问题,建议在项目中只使用 npm或 yarn一种包管理工具。使用 yarn作为项目的包管理工具,可以删除 package-lock.json 文件来解决该问题。

del package-lock.json
//使用该命令删除package-lock.json文件后,问题未解决,任然不能安装 react-transition-group

2、解决淘宝镜像源过期问题

出现An unexpected error occurred

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IceSugarJJ

谢谢你对我的肯定[乖巧]

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值