I’m in the process of setting up CI for test and stage builds and would like to use exp publish to push the builds out from the CI server. However, it seems that the packager needs to be running in order to do a publish. I’m not looking to publish to the app store with these builds.
What am I overlooking? I don’t want to be running the packager on the CI server to publish test builds?
exp publish will start a packager server automatically when you run it if one isn’t already running, and when the command finishes, it will stop the packager.
that makes sense, something else is going wrong then. I get the following error when attempting to run exp publish. It works fine from the Expo XDE or if I started the packager previously.
exp publish
[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Publishing...
[exp] No packager found for project at /Users/byron/Projects/[project].
I think what’s happening is that Expo XDE doesn’t stop the packager properly (this also happens when running exp start sometimes. I’ve seen this a few times where trying to start exp start from the command line after using Expo XDE gives the following error:
exp start
[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] exp is already running for this project. Exiting...
Sorry, I wasn’t clear earlier that you were running this locally.
Please delete your .expo directory in your project folder, ensure that no packagers are running, and then run exp publish and a packager should start automatically.
In CI, I would recommend making sure you delete .expo (may not be necessary depending on how you’re doing caching between builds in your CI provider)
I figured my issues out. Basically I had a docker containing that was running on port 80 which was causing the packager to report that one is already running.