axeldelafosse / expo-next-monorepo-example

Create a universal React app using Expo and Next.js in a monorepo

Home Page:https://expo-next-monorepo-example.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expo publish not working properly

amorealz opened this issue · comments

Hey guys!

Awesome project here.

I was playing around with it to check its functionality and where it may lead to, and possibilities are endless. Thanks a lot for sharing your knowledge and this great monorepo configuration.

I was able to deploy the nextjs app to AWS Amplify (just a bit of struggles because of AWS documentation was not super clear) but at the end work perfectly. That side of my CI/CD is going great.

The other side that is the expo publish flow for the native app, is not going so great. The publish completes successfully in the CLI but when trying to open in the Expo Go app, using the QR code, it hangs with a black or white screen. Tried several iPhones and the result is always the same. Rarely enough, the app works perfectly in development, even when putting the production mode on.

I tried to log errors to Sentry or something suspecting a crash might be happening, but with no success. I think it's related to something (maybe js) not loading properly, but my current knowledge is not letting me find the root cause.


To reproduce you can clone the repo, change the owner in the app.config.js to be able to publish to your own expo account and then:

yarn install
cd packages/expo
yarn publish:production

You'll get a successful output from Expo CLI as follows:

Bundle                              Size
┌ index.ios.js (Hermes)           825 kB
├ index.android.js (Hermes)       825 kB
├ index.ios.js.map (Hermes)      3.45 MB
└ index.android.js.map (Hermes)  3.45 MB

💡 JavaScript bundle sizes affect startup time. Learn more: https://expo.fyi/javascript-bundle-sizes

Analyzing assets
Saving assets
No assets changed, skipped.

Processing asset bundle patterns:
- /home/mora260/Projects/Learning/Mono/expo-next-monorepo-example-main/packages/expo/**/*

Uploading JavaScript bundles
Publish complete

📝  Manifest: https://exp.host/@amoraz/example/index.exp?release-channel=production&sdkVersion=43.0.0 Learn more: https://expo.fyi/manifest-url
⚙️   Project page: https://expo.dev/@amoraz/example?release-channel=production Learn more: https://expo.fyi/project-page

Done in 13.48s.

But if you go to that link and try to open it with the Expo Go iOS App, it will fail to start and show the Hello World.

Can you guys point me in the right direction on how to troubleshoot this issue?

Thanks a lot for any help!

you should open an issue with expo

Well yeah… but I first thought to come here since the project was not publishing correctly and regular Expo project are publishing just fine.

So it is clearly a configuration problem. Maybe metro or webpack. Maybe it is trying to access a file at runtime that can’t be accessed because there is no development server anymore.

Thought that you guys were going to be interested in making the repo 100% compatible with current expo but it seems I was mistaken