- Whether you are bare or managed workflow
- What you have tried so far
- Clicked through every link on Google I could find (none mentioned this error specifically)
- Read the Expo Documentation as well as Troubleshooting Guide
- Ensured that the package.json is in the root directory
Error: package.json does not exist in /Users/expo/workingdir/build
I am building for iOS and having no issues up to the ‘Prepare Project’ phase. Each subsequent fails with the same error.
I have no idea where the ‘/Users/expo/workingdir/build’ directory actually is, as I don’t have an ‘expo’ user on my machine. Do I need to create these directories?
That’s on the build server. No, you do not need to create those directories on your local machine.
Do you by any chance have
EAS Build builds your app like other CI services — in short, the entire project is uploaded securely to the cloud, then it is downloaded by a build server, the dependencies are installed, and the build is run (learn more). Everything needed to build your app must be included in the project that is uploaded. The default mechanism for packaging your project is roughly equivalent to
git clone --depth 1, and so anything that is in your
.gitignore will not be uploaded (learn more in “How projects are uploaded to EAS Build”).
You likely do not want to upload your
node_modules directory, or maybe you have a
.env file that is ignored by source control. EAS CLI always respects
.gitignore files, but depending on your configuration there might be certain edge cases where EAS behavior is not 100% compliant with git.
You can run
eas build:inspect --platform [ios|android] --stage archive --output ~/target/output/path --profile production and inspect the output directory (in this case
~/target/output/path) to see which files are included.
I actually just very recently found a Github post that mentioned this issue and having package.json in the .gitignore. Which I did! I removed it and tried to rebuild but same error. Maybe I need to do something like push it back to Github to ensure the package.json exists?
Either way thank you so much for the first link, that is super helpful!
eas build:inspect command to see what’s being included.
You don’t need to push to GitHub.
package.json should be included as long as you don’t have it ignored.
Another thing: I don’t suppose this is a monorepo? There’s some info on those here: