在同一个项目中使用 NPM 和 Yarn 有什么危害吗? [英] Is there any harm in using NPM and Yarn in the same project?

查看:60
本文介绍了在同一个项目中使用 NPM 和 Yarn 有什么危害吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在将 npm 用于个人项目,最近偶然发现了 yarn.会不会有任何伤害或预期的副作用"?在我使用 npm 的同一个项目中切换到 yarn 的包管理器?

I have been using npm for a personal project and just recently stumbled across yarn. Would there be any harm or "intended side effects" to switching to yarn's package manager in the same project where I had been using npm?

推荐答案

虽然这里有一些评论者说在同一个项目中混合使用 yarn 和 npm 是可以的,但是在使用了 yarn 和 npm 然后再次使用 yarn 之后,这就是 yarn不得不说:

Although a few commenters here say its ok to mix both yarn and npm on the same project, after using yarn and npm and then yarn again, this is what yarn has to say about it:

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.

这篇关于在同一个项目中使用 NPM 和 Yarn 有什么危害吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆