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.74k stars 1.4k forks source link

ignite expo CNG workflow generated in iOS, android folders and defaults in development build instead of expo #2836

Closed redoc123 closed 1 week ago

redoc123 commented 2 weeks ago

Describe the bug

I selected expo CNG workflow, it created native folders for both iOS and android. When I do "npm run ios" it starts a development build instead of expo build. when I switch to expo build and scan the qr from phone it gives this error (attached: react-native-mmkv is not supported in Expo Go! Use EAS ('expo prebuild") or eject to a bare workflow instead.)

your documentation says that when I select CNG workflow it does nt generate native folders and its just expo build. attached.

Screenshot 2024-11-08 at 12 26 44 PM

Is the documentation not updated or am I missing something?

IMG_306D2F9AE24F-1

Ignite version

51.0.38

Additional info

platform darwin
arch arm64
cpu 10 cores Apple M1 Pro
directory thatApp /Users/thatGuy/doctyn/mobileApp/y/thatApp

JavaScript (and globally-installed packages) node 20.16.0 /Users/thatGuy/.nvm/versions/node/v20.16.0/bin/node npm 10.8.1 /Users/thatGuy/.nvm/versions/node/v20.16.0/bin/npm
corepack 0.28.2
eas-cli 10.2.2
generator-jhipster 8.6.0
generator-springboot 0.1.6
jhipster 0.0.2
localtunnel 2.0.2
mongoose-data-seed 2.1.6
node-check-updates 0.1.9
npm-check-updates 17.0.3
npm 10.8.1
plop 4.0.1
pnpm 9.7.0
yo 5.0.0
yarn - not installed
pnpm 9.7.0 /Users/thatGuy/.nvm/versions/node/v20.16.0/bin/pnpm

bun 1.1.17 /Users/thatGuy/.bun/bin/bun expo 51.0.38 managed Ignite ignite-cli 10.0.4 /Users/thatGuy/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite ignite src build /Users/thatGuy/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build Android java 19.0.2 /usr/bin/java android home - /Users/thatGuy/Library/Android/sdk iOS xcode 16.0 cocoapods 1.15.2 /opt/homebrew/bin/pod Tools git git version 2.45.2 /opt/homebrew/bin/git
frankcalise commented 2 weeks ago

hey @redoc123 - yes you are correct, picking CNG does generate the ios/android directories locally, however it does leave them in the gitignore. This is simply due to allowing you to run your build locally rather than having to build a dev client out of the box.

You can of course remove them without any issue, build your dev client and work that way. They're basically the same thing.

In version 10, there is no support for Expo Go out of the box with the default boilerplate. This allowed us to make changes such as mmkv and others.

To utilize Expo Go, you could ignite an app using the last version of 9.x or remove dependencies that will not work in Expo Go. MMKV and keyboard controller would be the two you need to remove.

MMKV can be replaced with react-native-community's async storage.

Keyboard controller will just need the <Screen /> component reworked to only use RN core's KeyboardAvoidingView. Details around that PR can be seen here: https://github.com/infinitered/ignite/pull/2722/files#diff-a83d8be471e743b3ea8cde8be257278410fa801f958fee58cec5631445e9e708

frankcalise commented 1 week ago

I've updated the steps over at https://ignitecookbook.com (although they're not published yet, but you can view the PR here with how to get back to Expo Go if that is your interest.

Let us know if you need any additional help! I'll close this as it is expected and not an issue, but feel free to ask for additional help on Discussions or in our Community Slack!

redoc123 commented 1 week ago

thanks a bunch @frankcalise for the quick response.