Ignite: Ignite requires react-native-cli >=2.0.0 to be installed.

Created on 9 May 2017  ·  17Comments  ·  Source: infinitered/ignite

Hello,

I'm a Windows user (yes I know ...) and i (would) use Ignite with yarn, so I execute this in CMD:
yarn global add react-native-cli
yarn global add ignite-cli

So, allllll isssss goood ! No errors
react-native -v return

react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory

And it's time to execute ignite,
ignite new App

Annnddddd ... nop

Ignite requires react-native-cli >=2.0.0 to be installed.
To install: npm i -g react-native-cli
Checking for 'react-native' npm package conflict...

I confess that I raged, But I really really really want to use ignite for my project ! So you can help me?

Thanks,

bug pending windows

Most helpful comment

I've got the yarn issue as well.

When the yarn version is being checked, inside src/cli/enforceGlobalDependency.js in getVersion(),raw is equal to:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.

The problem appears to be the spaces in the path.

Quick Fix

I fixed it by changing line 80 to:
var resolvedPath = '"' + which.sync(whichExec) + '"';

Don't want to make a pull request, as I'm really not familiar with which, and there's probably a better way.

For a temporary solution just do the change I described inside src/cli/enforceGlobalDependency.js

All 17 comments

Ignite work on Bash for Windows ... So i use that way for the moment !

That npm package conflict is interesting. We're going to set up an appveryor CI to help catch issues. But we've generally had success on windows.

Perhaps it's the boilerplate? Can you try another?

This is not the fault of the boilerplates, because when I just perform
ignite
I get the same errors...

As I have time to lose today, I will uninstall yarn etc ... and reinstall everything, and all this in joy and good humor !
But if you have a patch for this issuse, let me know !

Thanks,

Ok ! So to be honest, I do not know what I did, I reinstall yarn while deleting chocolatey, I regenerate the installation nodejs and npm (and many, many others) and now i have this:

C:\ ignite
Ignite requires yarn >=0.21.0 to be installed.
See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.

So it makes sense, except that ...

C:\ yarn -v
yarn install v0.23.4
[1/4] Resolving packages...
success Already up-to-date.
Done in `0.01s

So, I will try to go there gently to make him recognize yarn

Thanks,

I thought we had fixed this issue! We'll be doing another release soon, but I'm not sure why this is acting up. What version of ignite?

I'm sure it's the latest version, When will the new release take place ?

same here => Ignite requires yarn >=0.21.0 to be installed.

PS E:Projects> yarn --v
yarn install v0.23.4
info No lockfile found.
...

Windows 10 - up to date
Node v7.10.0

Temporary Workaround

Seems like ignite just isn't able to run the shell commands to get the installed version of dependencies.
I edited the check.js file located in AppData\Roaming\npm\node_modules\ignite-cli\src\cli to bypass all the checks.
Ignite now initializes the project just fine despite printing dependency check failed messages.
I edited the check.js so the process doesn't exit even when the check fails.
Maybe this gives developers a hint to what the actual problem is.

>ignite new MyIgniteApp
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
-----------------------------------------------
  (                  )   (
  )\ )   (        ( /(   )\ )    *   )
 (()/(   )\ )     )\()) (()/(  ` )  /(   (
  /(_)) (()/(    ((_)\   /(_))  ( )(_))  )\
 (_))    /(_))_   _((_) (_))   (_(_())  ((_)
 |_ _|  (_)) __| | \| | |_ _|  |_   _|  | __|
  | |     | (_ | | .` |  | |     | |    | _|
 |___|     \___| |_|\_| |___|    |_|    |___|
-----------------------------------------------

An unfair headstart for your React Native apps.
https://infinite.red/ignite

-----------------------------------------------

🔥 igniting app MyIgniteApp
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
√ using the Infinite Red 2016 boilerplate
√ added React Native 0.42.0
? Would you like Ignite Development Screens? Yes
? What vector icon library will you use? react-native-vector-icons
? What internationalization library will you use? none
? What animation library will you use? react-native-animatable
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
√ added ignite-ir-boilerplate-2016
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
√ added ignite-dev-screens
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
√ added ignite-vector-icons
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
√ added ignite-animatable
√ configured git

🍽 Time to get cooking!

To run in iOS:
  cd MyIgniteApp
  react-native run-ios

To run in Android:
  cd MyIgniteApp
  react-native run-android

To see what ignite can do for you:
  cd MyIgniteApp
  ignite

Also, ignite doctor seems to detect everything just fine.

>ignite doctor
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
System
  platform           win32                                                                                              
  arch               x64                                                                                                
  cpu                8 cores                                                   Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  directory          C:\Users\ahsodhi\Documents\ReactNative\IgniteTest                                            

JavaScript
  node               7.10.0       C:\Program Files\nodejs\node.EXE
  npm                4.2.0        C:\Program Files\nodejs\npm.CMD
  yarn               0.24.4       C:\Program Files (x86)\Yarn\bin\yarn.CMD

React Native
  react-native-cli   2.0.1
  app rn version     0.42.0

Ignite
  ignite             Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli
Ignite requires yarn >=0.21.0 to be installed.

See https://yarnpkg.com/en/docs/install on how to upgrade for your OS.
2.0.0-beta.9   C:\Users\Anirudh Sodhi\AppData\Roaming\npm\ignite.CMD

Android
  java               -            C:\ProgramData\Oracle\Java\javapath\java.EXE
  android home       -            C:\Android\sdk

I'm having this problem as well while trying to add maps plugin onto my project.

Tried to npm uninstall -g react-native & npm install -g react-native-cli but still cant add the plugins.

Any workaround for this?

D:\Desktop\Makan>ignite add maps
Ignite requires react-native-cli >=2.0.0 to be installed.

To install: npm i -g react-native-cli

Checking for 'react-native' npm package conflict...

It appears you have the global npm package 'react-native' installed. This causes problems
with Ignite. You may have installed this by mistake. Instead, you probably want the
react-native-cli npm package.

npm uninstall -g react-native
npm install -g react-native-cli

I think @jamonholmgren could add bug as label of this issue ^^.

For now, while waiting for a fix, the most suitable solution for windows 10 is the Linux subsystem

Bash for Windows

You can install the Linux environment on windows to avoid system incompatibilities (as the subjet of this issue)

To enable bash, follow the Microsoft tutorial here

Then you can execute all bash command, npm, yarn etc...

Warning

For use
react-native run-android | react-native run-ios,
You must execute it from CMD, because Windows env variables are not include in bash (%ANDROID_HOME%).
Remember this, because it is the cause of many misunderstandings

@kevinvangelder - can you help with this please?

I've got the yarn issue as well.

When the yarn version is being checked, inside src/cli/enforceGlobalDependency.js in getVersion(),raw is equal to:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.

The problem appears to be the spaces in the path.

Quick Fix

I fixed it by changing line 80 to:
var resolvedPath = '"' + which.sync(whichExec) + '"';

Don't want to make a pull request, as I'm really not familiar with which, and there's probably a better way.

For a temporary solution just do the change I described inside src/cli/enforceGlobalDependency.js

I get this error as well: Ignite requires react-native-cli >=2.0.0 to be installed.

When i downgrade to 2.0.0-beta.4 however I am able to get it working with nvm-windows

This should be fixed in the next release.

I see this issue on mac too...

$ ignite new Pizza
Ignite requires react-native-cli >=2.0.0 to be installed.
To install: npm i -g react-native-cli
Checking for 'react-native' npm package conflict...

$ npm view react-native-cli version
2.0.1

$ npm view ignite version
0.1.8

happening to mac too:

ignite new MyNewAppName

An unfair headstart for your React Native apps.
https://infinite.red/ignite


🔥 igniting app MyNewAppName
Ignite requires react-native-cli >=2.0.0 to be installed.

You currently have 0.43.2 installed.

To install: npm i -g react-native-cli

Checking for 'react-native' npm package conflict...

System
platform darwin
arch x64
cpu 8 cores Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
directory /Users/bywright/Projects

JavaScript
node 7.8.0 /usr/local/bin/node
npm 4.2.0 /usr/local/bin/npm
yarn 0.22.0 /usr/local/bin/yarn

React Native
react-native-cli 2.0.1

Ignite
ignite 2.0.0-beta.9 /usr/local/bin/ignite

Android
java 1.8.0_92 /usr/bin/java
android home - /Users/bywright/Library/Android/sdk

iOS
xcode 8.3.2

Was this page helpful?
0 / 5 - 0 ratings