1
$ 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 [email protected]: 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

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=10.17.0". Got "10.15.2"
error Found incompatible module.
5
  • remove package-lock.json or use npm install Commented Jun 29, 2020 at 9:13
  • about the second error: add file .node-version in the root which include single line: v10.17.0. But first you need to install the same node version on your local machine. Commented Jun 29, 2020 at 9:14
  • @demkovych I would to like install yarn in a project. Commented Jun 29, 2020 at 9:17
  • then remove package-lock.json and run yarn install --ignore-engines Commented Jun 29, 2020 at 9:18
  • @demkovych thanks man this is working. can you please add the answer then I can vote your answer thanks. Commented Jun 29, 2020 at 9:20

2 Answers 2

4

Remove package-lock.json and run yarn install --ignore-engines

Sign up to request clarification or add additional context in comments.

Comments

0

When working on a team, sometimes another dev installs it. One good way to avoid this happening is using package-locks-checks, which I wrote.

If you run npx package-locks-checks it will check for this kind of inconsistencies and avoid you to have issues on production environment.

1 Comment

When linking to your own site or content (or content that you are affiliated with), you must disclose your affiliation in the answer in order for it not to be considered spam. Having the same text in your username as the URL or mentioning it in your profile is not considered sufficient disclosure under Stack Exchange policy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.