Eas build returns cannot copy to a subdirectory of itself

Am currently working on a mobile app project using the expo managed workflow, currently want to build the app to android and iOS using the eas build.

When I ran eas build

It was able to generate the android Keystore for me then it started compressing the files, after 45mins it showed this error

� Android build
√ Using remote Android credentials (Expo server)
√ Generate a new Android Keystore? ... yes
√ Created keystore
× Compressing project files
    Error: Cannot copy 'C:\Users\Duncan' to a subdirectory of itself,
    'C:\Users\Duncan\AppData\Local\Temp\eas-cli-nodejs\a55f437c-db63-422d-87fc-4e9d772fad96-shallow-clone'.

The current path where my app is saved on

'C:\Users\Duncan'

Hi @jerry_duncan

I assume the app is actually in a subdirectory? e.g. C:\Users\Duncan\My Documents\your-app?
It should definitely not be trying to copy your whole home directory.
Do you have your app checked into Git?
Do you have a .git directory in the root directory of your app (at the same level as app.json and package.json?
Do you have a .git directory in C:\Users\Duncan?
Do you have files like app.json or package.json directly in C:\Users\Duncan?

1 Like

Exactly as you predicted, the .git folder for the app was residing inside the

C:\Users\Duncan

directory. I had to remove it and add it inside the main app directory.

The build is now working. Thanks man, you saved my day

1 Like