0

I am trying to create new project via react native project via react-native-cli react-native init ProjectName and get the following error

error Found incompatible module info

Visit https://yarnpkg.com/en/docs/cli/add for documentation about this

Error: Command failed: yarn add react-native --exact

Project can be created with the same command when react native version is less then or equal to 0.54

react-native init ProjectName --version react-native@0.54

The following links also did not helped me.

https://github.com/facebook/react-native/issues/14861

https://github.com/yarnpkg/yarn/issues/3227

hong4rc
  • 3,999
  • 4
  • 21
  • 40
shah
  • 1,163
  • 2
  • 19
  • 40

2 Answers2

4

I solve the problem just moment.

the reason is node version problem.

you can install >10.0 node.

then, react-native init project succeed.

C.Wei
  • 56
  • 3
0

I came across similar issue. Following are the steps I took to solve it.

  1. Noticed the yarn error occurs due to incompatible node module version. It required node version >= 8.0. For this, I changed the node version using nvm: nvm use 8.0.0

Note: Check first if you have a installed node version >= 8.0 using nvm list. If yes, just use the above command. Otherwise install it by nvm install v8.0.0.

  1. After this, you might come across similar error for npm. I did not have updated npm version. Install latest npm by npm install -g npm@latest

Try to create new react-native project, react-native init HelloWorld.

pritam
  • 2,452
  • 1
  • 21
  • 31