Ignite: failed to add React Native 0.45.1

Created on 2 Aug 2017  ·  16Comments  ·  Source: infinitered/ignite

I am getting an failed to add React Native 0.45.1 error when I try to create a new app

🔥 igniting app newTestapp
✔ using the Infinite Red boilerplate v2 (code name 'Andross')
✖ failed to add React Native 0.45.1

ignite doctor results:

System
  platform           darwin                                                                                  
  arch               x64                                                                                     
  cpu                8 cores                            Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz  
  directory          /Users/barcode/testrn                                                        

JavaScript
  node               8.2.1        /usr/local/bin/node           
  npm                5.3.0        /usr/local/bin/npm            
  yarn               0.21.3       /Users/barcode/.yarn/bin/yarn  

React Native
  react-native-cli   1.0.0       

Ignite
  ignite             2.0.0        /Users/barcode/.node/bin/ignite  

Android
  java               1.8.0_141    /usr/bin/java                      
  android home       -            /Users/barcode/Library/Android/sdk  

iOS
  xcode              7.3.1
question

Most helpful comment

FWIW, I did run into this issue myself when I tried to name my app with a name that started with a number: "5guys" made my ignite install unhappy

All 16 comments

Same here
tried reinstalling everything but no result.
Here goes the output with the debug flag

`Checking for 'react-native' npm package conflict...
23:07:58 [ignite] error running boilerplate
23:07:58 [ignite]
Error: Command failed: ignite boilerplate-install ir-boilerplate MyNewAppName --debug

Checking for 'react-native' npm package conflict...
23:07:58 [ignite] error running boilerplate
23:07:58 [ignite]
  Error: Command failed: ignite boilerplate-install ir-boilerplate MyNewAppName --debug

  - index.js:210 Promise.all.then.arr
    [lib]/[ignite-cli]/[gluegun]/[execa]/index.js:210:11

  - next_tick.js:109 process._tickCallback
    internal/process/next_tick.js:109:7

@barcode11 and @folivi , I just ignited a new app and it worked okay.

@barcode11 , it appears you have an old version of react-native-cli. Can you upgrade it with npm uninstall -g react-native-cli && npm install -g react-native-cli?

@folivi Can you post ignite doctor results?

@jamonholmgren here it goes

System
  platform           darwin                                                                                                
  arch               x64                                                                                                   
  cpu                8 cores                                          Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz  
  directory          /Users/ffolivi/Documents/projects/2017/iginite                                                        

JavaScript
  node               8.0.0        /Users/ffolivi/.nvm/versions/node/v8.0.0/bin/node  
  npm                5.0.0        /Users/ffolivi/.nvm/versions/node/v8.0.0/bin/npm   
  yarn               0.22.0       /usr/local/bin/yarn                                

React Native
  react-native-cli   2.0.1       

Ignite
  ignite             2.0.0        /Users/ffolivi/.nvm/versions/node/v8.0.0/bin/ignite  

Android
  java               1.8.0_121    /usr/bin/java               
  android home       -            /usr/local/opt/android-sdk  

iOS
  xcode              8.3.3       

I have this problem as well.

System
  platform           darwin
  arch               x64
  cpu                8 cores                                        Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  directory          /Users/matthudson/Development/Bilt/IgnitePOC

JavaScript
  node               8.4.0        /usr/local/bin/node
  npm                5.3.0        /usr/local/bin/npm
  yarn               0.23.2       /Users/matthudson/.yarn/bin/yarn

React Native
  react-native-cli   2.0.1

Ignite
  ignite             2.0.0        /usr/local/bin/ignite

Android
  java               1.8.0_121    /usr/bin/java
  android home       -            /Users/matthudson/Library/Android/sdk

iOS
  xcode              8.3.2

Same thing if you grab the latest version of yarn? I seem to remember issues with older yarns and new node 8.

Another thing you can try is passing --npm with your ignite command. This will try to force npm instead of yarn.

Hi @skellock
passing --npm doesn't help either
--debug shows:


08:36:23 [ignite] making directory MyAwesomeApp
08:36:23 [ignite] switched directory to /Users/ffolivi/Documents/projects/2017/iginite/MyAwesomeApp
08:36:23 [ignite] running boilerplate: ignite boilerplate-install ir-boilerplate MyAwesomeApp --debug --npm
Ignite CLI 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...
08:36:33 [ignite] error running boilerplate
08:36:33 [ignite]
  Error: Command failed: ignite boilerplate-install ir-boilerplate MyAwesomeApp --debug --npm

  - index.js:210 Promise.all.then.arr
    [lib]/[ignite-cli]/[gluegun]/[execa]/index.js:210:11


  - next_tick.js:188 process._tickCallback
    internal/process/next_tick.js:188:7


08:36:33 [ignite] cleaning temporary files
08:36:33 [ignite] finished running new

Thx,

How when you do something like this:

cd /tmp
mkdir folivi
cd folivi
npm init -y
ignite boilerplate-install ir-boilerplate MyAwesomeApp --debug --npm

Does it tell you a more specific error?

(the tmp directory thing is so it won't go crawling up the file system directories for a node_modules directory here)

This works perfectly.
The project has been generated and runs fine.
Should I do this as workaround? Generate the project there then copy it to the actual workdir?

Wait, that works? It shouldn't. haha.

I was only trying to get at the real error message behind that swalled promise exception.

So does that work if you:

cd /Users/ffolivi/Documents/projects/2017/iginite
mkdir wtf
cd wtf
npm init -y
ignite boilerplate-install ir-boilerplate MyAwesomeApp --debug --npm

It only works in /tmp/folivi.
From /Users/ffolivi/Documents/projects/2017/iginite It fails with the following:

14:19:07 [ignite] running boilerplate-install command
⠋ adding ignite-ir-boilerplate14:19:09 [ignite] ignite-ir-boilerplate 2.0.2 on npm.
14:19:09 [ignite] npm i ignite-ir-boilerplate --save-dev
⠏ adding ignite-ir-boilerplate14:19:12 [ignite] finished npm command
✔ using the Infinite Red boilerplate v2 (code name 'Andross')
14:19:15 [ignite] initializing react native
14:19:15 [ignite] react-native init festivapp --version 0.45.1
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
✖ failed to add React Native 0.45.1


The message is completely wrong because react-native is not installed globally

Do you have node_modules in any of the following places by any chance?

  • /Users/ffolivi/Documents/projects/2017/iginite
  • /Users/ffolivi/Documents/projects/2017
  • /Users/ffolivi/Documents/projects
  • /Users/ffolivi/Documents
  • /Users/ffolivi
  • /Users
  • /

?

found in: /Users/ffolivi
and /Users/ffolivi/Documents/projects/2017/iginite

Solved (for my case)
I removed the react-native directory from /Users/ffolivi/npm_packages
then ignite new app in my workdir

Thank you @skellock !!!

FWIW, I did run into this issue myself when I tried to name my app with a name that started with a number: "5guys" made my ignite install unhappy

I had the same issue, but when I ran " sudo ignite new ProjectName " it all went fine :)

I resolved this issue by upgrade node to 11.8.0 or 10.15.0.
If you use nvm: nvm install 11.8.0
If you use n: n 11.8.0

Was this page helpful?
0 / 5 - 0 ratings