Problems when compiling my application with expo

Hello, My name is Jessy Monroy, I’m a junior developer. Turns out I’m trying to build my app (surely there are a lot of failed build logs on this forum, so I apologize for adding one more in advance). I am running the command npx cross-env EAS_NO_VCS=1 eas build -p android Since I am not using a git repository yet to build the apk.

The error that my powershell console prints is: × Compressing project files
Failed to upload the project tarball to EAS Build

Reason: Cannot copy ‘C:\Users\david’ to a subdirectory of itself, ‘C:\Users\david\AppData\Local\Temp\eas-cli-nodejs\1dd6cd4c-2463-4684-ab25-d48576bb00a6-shallow- clone’.
Error: build command failed. I already tried cleaning gradle, but since the error is not identified, I don’t know how to proceed. I’ve been reading some discussion forums looking for an answer, but most either don’t say anything or require rather aggressive configuration of the project.

I’m just looking to generate the apk to make the delivery. I appreciate any kind of help.

My email is: My cli expo is configured with the latest version available for July 06, 2023. Thank you.

Hi @estadovariable

I strongly recommend you start using Git. One way that the Expo tools use to find the root of your project is to find the root of the Git repository. Also, it allows you to keep track of the changes to your project so that you can more easily find a change that introduced a bug and things like that.

The error in your case seems to be that it thinks your home directory is the root of your project and it’s trying to copy the whole home directory to a temp directory which is itself somewhere inside the home directory.

If you insist on not using Git, then you might have a package.json or app.json in your home directory and Expo might be walking its way up from your project directory until it finds those files in your home directory.

If you have any of the following files/directories directly in your home directory (as opposed to somewhere below your home directory) then you should get rid of them or move them somewhere else:

  • package.json
  • app.json
  • package-lock.json
  • yarn.lock
  • node_modules