简体   繁体   English

在 react js 项目中安装纱线时出错

[英]getting error while installing the yarn in react js project

$ yarn install
yarn install v1.19.1
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 cau
sed by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
error app@0.3.0: The engine "node" is incompatible with this module. Expected version ">=10.17.0". Got "10.15.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

getting the errors while installing the yarn in react js project在 react js 项目中安装纱线时出现错误

error app@0.3.0: The engine "node" is incompatible with this module. Expected version ">=10.17.0". Got "10.15.2"
error Found incompatible module.

Remove package-lock.json and run yarn install --ignore-engines删除package-lock.json并运行yarn install --ignore-engines

When working on a team, sometimes another dev installs One good way to avoid this happening is using package-locks-checks .在团队中工作时,有时另一个开发人员会安装一个避免这种情况发生的好方法是使用package-locks-checks

If you run npx package-locks-checks it will check for this kind of inconsistencies and avoid you to have issues on productions enviroment.如果您运行npx package-locks-checks它将检查这种不一致并避免您在生产环境中遇到问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM