infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.67k stars 1.4k forks source link

Error generating new project with Expo #1725

Closed phhoef closed 3 years ago

phhoef commented 3 years ago

What's going on?

When creating a new project with expo support, I'll get the following error:

➜  ~ npx ignite-cli new myProject --expo

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

    █ Creating myProject using Ignite 7.0.6
    █ Powered by Infinite Red - https://infinite.red
    █ Using expo-cli
    ────────────────────────────────────────────────

    🔥 Igniting app
    🪔 Summoning Expo CLI
    🎫 Cleaning up Expo install
    🧶 Unboxing NPM dependencies
    ⠋  Writing your app name in the sand
/Users/ph/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:13
    throw up;
    ^
mv: no such file or directory: /Users/ph/myProject/ios/myProject
mv: no such file or directory: /Users/ph/myProject/ios/myProject-tvOS
mv: no such file or directory: /Users/ph/myProject/ios/myProject-tvOSTests
mv: no such file or directory: /Users/ph/myProject/ios/myProject.xcodeproj
mv: no such file or directory: /Users/ph/myProject/ios/myProject.xcodeproj/xcshareddata/xcschemes/myProject-tvOS.xcscheme
mv: no such file or directory: /Users/ph/myProject/ios/myProject.xcodeproj/xcshareddata/xcschemes/myProject.xcscheme
mv: no such file or directory: /Users/ph/myProject/ios/myProjectTests
mv: no such file or directory: /Users/ph/myProject/ios/myProjectTests/myProjectTests.m
mv: no such file or directory: /Users/ph/myProject/ios/myProject.xcworkspace
mv: no such file or directory: /Users/ph/myProject/ios/myProject/myProject.entitlements
mv: no such file or directory: /Users/ph/myProject/ios/myProject-Bridging-Header.h
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, open '/Users/ph/myProject/android/app/src/main/AndroidManifest.xml'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/ph/myProject/android/app/src/main/AndroidManifest.xml'
}

Creating the project without expo (vanilla react native) is working.


Steps to reproduce

  1. Issue npx ignite-cli new myProject --expo

ignite doctor results:

➜  ~ npx ignite-cli doctor
System
  platform           darwin
  arch               x64
  cpu                12 cores     Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
  directory          ph           /Users/ph

JavaScript (and globally-installed packages)
  node               16.4.2       /usr/local/bin/node
  npm                7.18.1       /usr/local/bin/npm
    dblsqd-cli       0.6.0
    npm              7.18.1
  yarn               1.22.10      /usr/local/bin/yarn
    expo-cli         4.7.3

Ignite
  ignite-cli         7.0.6        /Users/ph/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
  ignite src         build        /Users/ph/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android
  java               1.8.0_231    /Users/ph/.jenv/shims/java
  android home       -            undefined

iOS
  xcode              12.5.1
  cocoapods          1.10.1       /usr/local/bin/pod
softshipper commented 3 years ago

I have the same issue on my Linux machine https://pop.system76.com/.


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

    █ Creating PizzaApp using Ignite 7.0.6
    █ Powered by Infinite Red - https://infinite.red
    █ Using expo-cli
    ────────────────────────────────────────────────

    🔥 Igniting app
    🪔 Summoning Expo CLI
    🎫 Cleaning up Expo install
    🧶 Unboxing NPM dependencies
    ⠏  Writing your app name in the sand
/home/developer/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:13
    throw up;
    ^
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp-tvOS
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp-tvOSTests
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp.xcodeproj
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp.xcodeproj/xcshareddata/xcschemes/PizzaApp-tvOS.xcscheme
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp.xcodeproj/xcshareddata/xcschemes/PizzaApp.xcscheme
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaAppTests
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaAppTests/PizzaAppTests.m
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp.xcworkspace
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp/PizzaApp.entitlements
mv: no such file or directory: /home/developer/rn/PizzaApp/ios/PizzaApp-Bridging-Header.h
node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, open '/home/developer/rn/PizzaApp/android/app/src/main/AndroidManifest.xml'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/developer/rn/PizzaApp/android/app/src/main/AndroidManifest.xml'
}

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

my expo version:

expo --version
4.7.3
jamonholmgren commented 3 years ago

Hm, interesting. Mine finishes properly:

npx ignite-cli new MyProject --expo
Need to install the following packages:
  ignite-cli
Ok to proceed? (y) y

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

    █ Creating MyProject using Ignite 7.0.6
    █ Powered by Infinite Red - https://infinite.red
    █ Using expo-cli
    ────────────────────────────────────────────────

    🔥 Igniting app
    🪔 Summoning Expo CLI
    🎫 Cleaning up Expo install
    🧶 Unboxing NPM dependencies
    🏝  Writing your app name in the sand
    🗄  Backing everything up in source control

   Ignite CLI ignited MyProject in 237.17s

   To get started:
     cd MyProject  
     yarn start  

   Need additional help?

   Join our Slack community at http://community.infinite.red.

   Now get cooking! 🍽
   · · · · · · · · · · · · · · · · · · 🔥 Ignite 🔥 · · · · · · · · · · · · · · · · · ·

My 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          Temp         /Users/jh/Code/Temp                      

JavaScript (and globally-installed packages)
  node                 14.15.3      /usr/local/bin/node 
  npm                  7.13.0       /usr/local/bin/npm  
    appium-doctor      1.15.3                           
    appium             1.17.1                           
    expo-cli           4.0.12                           
    npm                7.13.0                           
    pure-prompt        1.11.0                           
  yarn                 1.22.10      /usr/local/bin/yarn 
    create-next-app    9.4.4                            
    detox-cli          17.11.0                          
    expo-cli           4.4.3                            
    firebase-tools     9.3.0                            
    ios-deploy         1.11.4                           
    react-native-cli   2.0.1                            
    ts-node            8.8.2                            
    typescript         3.8.2                            
    vercel             21.3.3                           

Ignite
  ignite-cli         7.0.6        /Users/jh/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite      
  ignite src         build        /Users/jh/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build 

Android
  java               1.8.0_232    /usr/bin/java                 
  android home       -            /Users/jh/Library/Android/sdk 

iOS
  xcode              12.5.1     
  cocoapods          1.10.1       /usr/local/bin/pod 
shinlee03 commented 3 years ago

Same Issue over here


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

    █ Creating newProject using Ignite 7.0.6
    █ Powered by Infinite Red - https://infinite.red
    █ Using expo-cli
    ────────────────────────────────────────────────

    🔥 Igniting app
    🪔 Summoning Expo CLI
    🎫 Cleaning up Expo install
    🧶 Unboxing NPM dependencies
    ⠧  Writing your app name in the sand
/Users/dz2701/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:13
    throw up;
    ^
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject-tvOS
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject-tvOSTests
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject.xcodeproj
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject.xcodeproj/xcshareddata/xcschemes/newProject-tvOS.xcscheme
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject.xcodeproj/xcshareddata/xcschemes/newProject.xcscheme
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProjectTests
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProjectTests/newProjectTests.m
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject.xcworkspace
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject/newProject.entitlements
mv: no such file or directory: /Users/dz2701/Documents/newProject/ios/newProject-Bridging-Header.h
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, open '/Users/dz2701/Documents/newProject/android/app/src/main/AndroidManifest.xml'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/dz2701/Documents/newProject/android/app/src/main/AndroidManifest.xml'
}
softshipper commented 3 years ago

The doctor shows:

❯ npx ignite-cli doctor
System
  platform           linux                                                       
  arch               x64                                                         
  cpu                8 cores      11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 
  directory          rn           /home/developer/rn                             

JavaScript (and globally-installed packages)
  node               16.4.2       /home/developer/.nvm/versions/node/v16.4.2/bin/node 
  npm                7.18.1       /home/developer/.nvm/versions/node/v16.4.2/bin/npm  
    expo-cli         4.7.3                                                            
    npm              7.18.1                                                           
    yarn             1.22.10                                                          
  yarn               1.22.10      /home/developer/.nvm/versions/node/v16.4.2/bin/yarn 

Ignite
  ignite-cli         7.0.6        /home/developer/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite      
  ignite src         build        /home/developer/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build 

Android
  java               11.0.10      /home/developer/.sdkman/candidates/java/current/bin/java 
  android home       -            /home/developer/Android/Sdk 

@jamonholmgren How it is possible that you do not receive any error?

jamonholmgren commented 3 years ago

@softshipper It looks like folks who are having problems are using Node 16. We'll have to dig into this, thanks!

phhoef commented 3 years ago

The update fixes the problem - at least for me. Thanks for the quick help

siddug commented 3 years ago

Hi

I am using Ignite 7.0.8 and still facing the same issue. (Using Node 16).