expo / expo/eas-cli

EAS Build Fails: "tar: Cannot mkdir: Permission denied" on SDK 51 with a perfectly configured project

Open
#3,057 6 comments 3 reactions 0 assignees View on GitHub
needs review
Dominant language
TypeScript
Stars
1.4k
Forks
236
Avg merge
3d 1h
Merged PRs (30d)
91

Description

### Minimal reproducible example

https://github.com/JoaoLGXP/personal-finance-mobile-app

### Steps to reproduce

Hello Expo Team,

I am experiencing a persistent tar: Cannot mkdir: Permission denied error right at the start of the EAS build process. This is happening despite extensive troubleshooting and having a 100% correctly configured project. This points to a permission issue on the build worker environment itself.

Build Details:

Build ID: e152c019-393a-4546-9d27-c8570f0ea00e
Build Page: https://expo.dev/accounts/lucagxp/projects/financial-manager-app/builds/e152c019-393a-4546-9d27-c8570f0ea00e
Error Log:

tar: src/context: Cannot mkdir: Permission denied
tar: src/screens: Cannot mkdir: Permission denied
tar: src/context: Cannot mkdir: Permission denied
tar: src/context/FinancialContext.js: Cannot open: No such file or directory
tar: src/screens: Cannot mkdir: Permission denied
tar: src/screens/DashboardScreen.js: Cannot open: No such file or directory
tar: src/screens: Cannot mkdir: Permission denied
tar: src/screens/ExpensesScreen.js: Cannot open: No such file or directory
tar: src/screens: Cannot mkdir: Permission denied
tar: src/screens/SuggestionsScreen.js: Cannot open: No such file or directory
tar: Exiting with failure status due to previous errors
Troubleshooting Steps Already Taken:
I have worked extensively to debug this and can confirm the following:

All dependencies in package.json have been corrected and aligned with Expo SDK 51.
A dependency conflict with @expo/config-plugins was found and resolved using the "overrides" feature in package.json.
The project has been moved out of any cloud-synced folder (like OneDrive) to a clean, local path (C:\dev\App).
node_modules and package-lock.json have been deleted and reinstalled multiple times.
All configuration files (app.json, eas.json) have been validated and completed.
The expo-env-info output confirms that the installed dependencies match the (correct) versions in package.json.
Despite all of this, the build worker fails at the most basic step of extracting the project tarball. This is an environment issue that I cannot solve from my side.

Configuration Files:

package.json

JSON

{
"name": "financial-manager-app",
"version": "1.0.0",
"main": "App.js",
"files": [
"src",
"App.js",
"app.json",
"eas.json"
],
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"build:android": "eas build -p android --profile preview"
},
"dependencies": {
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-navigation/bottom-tabs": "^6.5.20",
"@react-navigation/native": "^6.1.17",
"expo": "~51.0.14",
"expo-dev-client": "~4.0.18",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-native": "0.74.2",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "3.31.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"eas-cli": "^5.9.1"
},
"private": true,
"overrides": {
"@expo/config-plugins": "8.0.11"
}
}
eas.json

JSON

{
"cli": {
"version": ">= 5.9.1"
},
"build": {
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
"production": {}
}
}
app.json

JSON

{
"expo": {
"extra": {
"eas": {
"projectId": "543b7faa-354e-4a66-8948-f3d703347980"
}
},
"android": {
"package": "com.lucagxp.financialmanagerapp"
}
}
}

### Environment

```text
$ npx expo-env-info

expo-env-info 1.3.3 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 22.14.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ~51.0.14 => 51.0.39
react: 18.2.0 => 18.2.0
react-native: 0.74.5 => 0.74.5
Expo Workflow: managed
```

### Expo Doctor Diagnostics

```text
$ npx expo-doctor@latest
14/14 checks passed. No issues detected!
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.