Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create project with bare react-native have expo commands #2675

Closed
trynx opened this issue Apr 27, 2024 · 7 comments
Closed

Create project with bare react-native have expo commands #2675

trynx opened this issue Apr 27, 2024 · 7 comments
Labels

Comments

@trynx
Copy link

trynx commented Apr 27, 2024

Describe the bug

When creating a new project and using the manual configuration, did it with bare (not expo) react-native, in the package.json the commands for start, ios and android included expo run and not react-native

Expected

    "start": "react-native start",
    "ios": "react-native run-ios",
    "android": "react-native run-android --active-arch-only",

Got

    "start": "npx expo start",
    "android": "npx expo run:android",
    "ios": "npx expo run:ios",

Ignite version

9.6.3

Additional info

Full terminal logs when creating app

✅ Do you want to use Expo? · Bare
✅ Do you want to initialize a git repository? (Y/n) · Yes
✅ Remove demo code? We recommend leaving it in if it's your first time using Ignite (y/N) · No
✅ Which package manager do you want to use? · yarn
✅ Do you want to install dependencies? (Y/n) · Yes
✅ ❗EXPERIMENTAL❗Would you like to enable the New Architecture? (y/N) · No
   
   
   
   
                                               .;;,.    .clll.                 
                                              .clll,    ,llll.           ...   
                                               .,;,.    ;lllc'.,.   .';cllllc, 
     .',,.                           ...      .'',,. .:lllllllll. .;lllc:;clll,
    .llll,                    .,...;cllll:.   ,llll, .llllllc,,'  clll:'.,cllc.
    ,llll'       ......;::.  'llcclllllllll'  ,llll,   .llll.    ,lllllllll:'  
    ,llll.    .;clllllclll.  'llllc,..,llll,  :llll.   'llll.    ,lllc,''..    
    ;llll.   :llllc:cllllc.  ,llll.   .llll, .lllll.   ,lllc...  ,lll:...';:.  
   .llllc.  ;lll;.   :lll,   ;lll;    'llll, .llllc.   ,llllcll' .:lllllllll,  
   .llll,  'lll:    .clll,   :lll,    ,llll. 'llll,    'lllllcc'   ';::::;'.   
   .llll,  ,lll:    .llll'  .llll,    ;llll. ,llll,     .....             .',..
   ,llll.  'llll:,,:cllll.  .lllc.    .''..  ... ....',;         ..',,:::;'..  
   ,llll.   'clllllllllll.     .....        ..,::cllllc.   .',:clllc;,'.       
   :llll.     ',;,'.;lllc...,;:clll;  ..',:cllllllllll:,;clllllc;,'.           
   llll:        ...'cllllllllllllll::cllllllc;,',cllllllllc;'..                
   llll,   ..,clllllllll::,,.,lllllllc:,'...    :lllllc,..                     
   c:;,.  .cllllc:;:llll.    ,ll:;,..          ;ll:,..                         
          :lll,.  .clll,     ..               .,..                             
          :lll:,,cllll,                                                        
          .cllllllllc'                                                         
           .'cllll:.                                                           
   
   
   
    █ Creating test using Ignite 9.6.3
    █ Powered by  ∞ Infinite Red  (https://infinite.red)
    █ Package Manager: yarn
    █ Bundle identifier: com.test
    █ Path: /Users/groot/Documents/react_native/test
    ────────────────────────────────────────────────────
   
    🖨  3D-printing a new React Native app
    🎨 Getting those last few details perfect
    🧶 Installing yarn dependencies (wow these are heavy)
       Configuring app.json
    🛠️  Generating native template via Expo Prebuild
    🛠️  Removing fancy demo markup
    🗄  Backing everything up in source control
   
    ────────────────────────────────────────────────────
   
    Ignited test in 161.04s  🚀 
    
    For next time: here are the Ignite options you picked!
      npx ignite-cli new test \
        --bundle=com.test \
        --git \
        --install-deps \
        --packager=yarn \
        --target-path=/Users/groot/Documents/react_native/test \
        --remove-demo=false \
        --workflow=manual \
        --no-timeout=false 
    
    ────────────────────────────────────────────────────
    
    Need additional help?
    
    Join our Slack community at http://community.infinite.red.
    
    ────────────────────────────────────────────────────
    
    Now get cooking! 🍽
      cd /Users/groot/Documents/react_native/test
      yarn ios
    Or Android via
      yarn android
    
    
yarn run v1.22.21
$ npx expo start
Starting project at /Users/groot/Documents/react_native/test
Starting Metro Bundler
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █ ▀▀▄ ▀▀▄ ███▄▄▀███ ███ ▄▄▄▄▄ █
█ █   █ ███ ▄▄█ ▄▄ ▄█▀   ▄ ▀▄ █ █   █ █
█ █▄▄▄█ █ ▄▄ █▄▄ █▀ █ ▄▀█▀▄ █▀█ █▄▄▄█ █
█▄▄▄▄▄▄▄█ █ ▀ █ ▀ █▄█▄█▄█ █ ▀ █▄▄▄▄▄▄▄█
█▄ ▄█▀▄▄▀   ██  ███  ██▀▀█▀█▀ ▄ ▄▄█▀▄ █
█▀ █▀▀ ▄▄█▄ ▄█▀█▄█▄▄  ▄▄▄ ██▄ ▀▀▄▀▀▄█ █
█ ▄██ ▀▄ ▀ ▄▄ ▄█▄ ▀▄▀▄█▄▀ █▀▀ ▄ ██ ██▀█
██   ▄▄▄▄ █▄▀ ▄ ▀ ██ ▄▄▀ ▄▄█▄▀▀▀ ▄▀█▀ █
██▄▄  █▄▀█▄ ██  █▄█  ██  ▀▀▄  █ ▀█▄▀▄▀█
█▄██▀  ▄██▄▀▄█▀█▄█▄ ▄██ ▄▀▄▀  ▀▄ ▀ ▄▄▄█
██▄ █ █▄▄ █▀▄ ▄█ ██ ▀█▄█ ▀██ ▀▀  █▀█  █
███ ▄▀▀▄▄██ ▀ ▄ ▄▄▄▀▄█▄  ▀█ ▄▀▄█▀▄ ▄█▄█
██▄ ▄█▄▄███ ██  ▀█▀  ██▄▀█▀█  ▀  █ ▀ ▀█
█▄▄▄ █ ▄█ ▀█▄█▀█▄▄▄▄  ▄▀ ▀▄█▄ ▄▄█  ▄▀▄█
█▄▄▄▄▄█▄█ ▀▄▄ ▄█ ██▄▄ █ ▀▄▀█▄ ▄▄▄ █▀█ █
█ ▄▄▄▄▄ █▀▄ ▀ ▄ ▄▄▄▀ ▄█▄▄ ▄ ▀ █▄█ ▀▄█ █
█ █   █ ██ ███  ▀██  █▄█ ▀██ ▄ ▄▄ ▄█ ▄█
█ █▄▄▄█ █  ▀▄█▀█▄██ ▄▀██  ▄▀█▀ ▀█▄▀██▄█
█▄▄▄▄▄▄▄█▄▄█▄▄▄█▄▄▄█▄▄█▄█▄██▄▄████▄██▄█

› Metro waiting on exp+test://expo-development-client/?url=http%3A%2F%2F192.168.0.158%3A8081
› Scan the QR code above to open the project in a development build. Learn more

› Web is waiting on http://localhost:8081

› Using development build
› Press s │ switch to Expo Go

› Press a │ open Android
› Press i │ open iOS simulator
› Press w │ open web

› Press j │ open debugger
› Press r │ reload app
› Press m │ toggle menu
› Press o │ open project code in your editor

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
› Stopped server
@trynx trynx added the bug label Apr 27, 2024
@trynx
Copy link
Author

trynx commented Apr 27, 2024

When trying to run then having this error

image

@frankcalise
Copy link
Contributor

Hi @trynx - bare in this case means you'll manage the native code yourself. You'll still have Expo dependencies, though.

We should make this more clear, however.

If you're looking for a version of Ignite that has absolutely no Expo dependencies, you can clone this (although not inline with the latest version of Ignite): https://github.com/frankcalise/ignite-vanilla-template

@trynx
Copy link
Author

trynx commented Apr 30, 2024

Hi @frankcalise :)

Sorry for the confusion, in this context when I said "bare", I'm meaning of launching it with react-native, but it's fine on using expo libs.

I'm right now using an older version that I created around a year ago, and wanted to move all my logic to a newer version of ignite because iOS stopped compiling on the old version... so while testing the new ignite version found out about this...

Eventually, will using expo as a launcher affect the end product? Of bundling the code with Android Studio and xcode, and not using Expo as the production launcher?

@frankcalise
Copy link
Contributor

@trynx Ah ok understood, thanks for clearing that up. I haven't tried using the RN CLI much in an Expo project. You might look to undo a few steps from here: https://docs.expo.dev/bare/installing-expo-modules/#optional-use-expo-cli-for-bundling

Adopting the Expo CLI has it's benefits though, listed here: https://docs.expo.dev/bare/using-expo-cli/#why-expo-cli-instead-of-npx-react-native

@trynx
Copy link
Author

trynx commented May 14, 2024

Ohh thanks @frankcalise
Last question that concerns me about choosing Expo, if going through the Expo CLI route, it also means to use all it's tools, harder (or impossible) to change some native code as needed for some third party libs, and deploying to the stores is through the EAS being, and being vendor lock to it?
Or maybe I'm missing something since the new versions of Expo?

@frankcalise
Copy link
Contributor

@trynx You do not have to worry about third party libs with Expo, you are free to choose any lib you find along the way. That's that great part about it.

You can also build locally via the EAS command line, you don't have to use their service in the cloud. Read [these docs] for more info: https://docs.expo.dev/build-reference/local-builds/

You can also build with Android Studio/Xcode like normal as well.

Here's a post similar to yours you can reference: https://forums.expo.dev/t/using-expo-managed-workflow-without-eas/69893

@frankcalise
Copy link
Contributor

Going to close this as I believe we have covered your questions! If you have any further questions, feel free to open them up on the Discussions board here or come join our Community Slack

Also Expo has a Discord where you can get tons of answers as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants