꽥꽥꽥*_*꽥꽥꽥 18 npm yarnpkg package-lock.json
我yarn install在 Visual Studio Code 中使用了该命令,但出现错误。以下错误消息。
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.
Run Code Online (Sandbox Code Playgroud)
我认为它package-lock.json与 yarn.lock的 npm冲突重叠
。
针对问题采取行动。
移除package-lock.json,移除node_modules
这个问题仍然没有解决。
谢谢你!
1nu*_*ter 13
我今天注意到一个类似的警告。在我删除 package.json 文件后问题就消失了。到目前为止,我在我的副项目中使用了 yarn 和 npm 可互换。
'npm install'创建 package-lock.json 并且 'yarn install'生成 yarn.lock 。通常,您坚持使用项目中的任何一个包管理器