ignite: `npx ignite-cli new foo` fails

I must be doing something wrong here, because the very first step in the tutorial is failing:

$ npx ignite-cli new foo
   

   · · · · · · · · · · · · · · · · · · 🔥 Ignite 🔥 · · · · · · · · · · · · · · · · · ·

    █ Creating foo using Ignite 6.9.0
    █ Powered by Infinite Red - https://infinite.red
    █ Using react-native-cli
    ────────────────────────────────────────────────

    🔥 Igniting app
    🖨  3D-printing a new React Native app
    ⠙ Baking CocoaPods
/Users/pepasibble/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:13
    throw up;
    ^
Scanning for pods...
1.10.1
> pod install

[!] Invalid `Podfile` file: cannot load such file -- /Users/pepasibble/tmp/ignite-test/foo/node_modules/react-native/scripts/react_native_pods.

 #  from /Users/pepasibble/tmp/ignite-test/foo/ios/Podfile:1
 #  -------------------------------------------
 >  require_relative '../node_modules/react-native/scripts/react_native_pods'
 #  require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
 #  -------------------------------------------

Aborting run
An unexpected error was encountered. Please report it as a bug:
CocoaPodsError: Command `pod install` failed.
└─ Cause: pod exited with non-zero code: 1
    at CocoaPodsPackageManager._installAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:86691)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async CocoaPodsPackageManager.installAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:84878)
    at async runAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:111085)
    at async /Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:111171 {
  code: 'COMMAND_FAILED',
  cause: Error: pod exited with non-zero code: 1
      at ChildProcess.h (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:1073)
      at Object.onceWrapper (node:events:472:26)
      at ChildProcess.emit (node:events:365:28)
      at maybeClose (node:internal/child_process:1067:16)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
      ...
      at Object.spawnAsync [as default] (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:558)
      at CocoaPodsPackageManager._runAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:87473)
      at CocoaPodsPackageManager._installAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:85195)
      at CocoaPodsPackageManager.installAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:84889)
      at runAsync (/Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:111093)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async /Users/pepasibble/.npm/_npx/7cf525d1e16b4e35/node_modules/pod-install/build/index.js:2:111171 {
    pid: 89907,
    output: [ '', '' ],
    stdout: '',
    stderr: '',
    status: 1,
    signal: null
  },
  isPackageManagerError: true
}


(Use `node --trace-uncaught ...` to show where the exception was thrown)

I checked and foo/node_modules/react-native/scripts/react_native_pods doesn’t exist, because node_modules doesn’t exist. It looks like npm install isn’t getting run?

I’ve tried to ensure I have all of the dependencies installed, which are apparently documented in this course: https://academy.infinite.red/p/installing-react-native-tutorial-on-macos but I can’t take the course because I get stuck in a loop:

  • The course says I need to enroll to start the course
  • When I click “enroll”, it says “you’ve already purchased this product”.
  • I click on the course, and we are back to “enroll in this course to get started”…

Maybe the dependencies should just be listed in a gist? That would be much less prone to this sort of problem.


Steps to reproduce

  1. npx ignite-cli new foo

ignite doctor results:

I can’t run ignite doctor because ignite doesn’t seem to be a command on my system, but I can run npx ignite-cli doctor:

$ npx ignite-cli doctor
System
  platform           darwin                                                 
  arch               x64                                                    
  cpu                16 cores      Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz 
  directory          ignite-test   /Users/pepasibble/tmp/ignite-test        

JavaScript (and globally-installed packages)
  node               16.0.0       /usr/local/bin/node 
  npm                7.10.0       /usr/local/bin/npm  
    lumo-cljs        1.10.1                           
    npm              7.10.0                           
  yarn               -            not installed       

Ignite
  ignite-cli         6.9.0        /Users/pepasibble/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite      
  ignite src         build        /Users/pepasibble/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build 

Android
  java               15.0.2       /usr/local/opt/openjdk/bin/java 
  android home       -            undefined                       

iOS
  xcode              12.4       
  cocoapods          1.10.1       /usr/local/bin/pod 

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 23 (5 by maintainers)

Most upvoted comments

Just to document this in case it is useful to others, dropping back to node v14 causes npx ignite-cli new foo to work correctly.

The temporary hack I performed to try this was:

brew uninstall --ignore-dependencies node
brew install node@14
export PATH="/usr/local/opt/node@14/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/node@14/lib"
export CPPFLAGS="-I/usr/local/opt/node@14/include"
npx ignite-cli new foo

Of course, the question this raises is: Why does node v16 cause ignite to decide not to run npm install, and why is that not detected as a fatal condition (the tool continues to run and pod install is what fails)?

Try with the latest nodejs lts. To simplify multiple nodejs installations try nvm