Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EACCES: permission denied, scandir #2075

Closed
janusqa opened this issue Oct 2, 2023 · 2 comments
Closed

EACCES: permission denied, scandir #2075

janusqa opened this issue Oct 2, 2023 · 2 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@janusqa
Copy link

janusqa commented Oct 2, 2023

Build/Submit details page URL

No response

Summary

When running build command expo-cli seems to be trying to access directors it likely has no right accessing

EACCES: permission denied, scandir  '/a/directory/outside/the/root/dir/that/eas.json/is/in'

Why is it trying to scandir directories outside the root folder in which eas.json resides. How can I fix it.

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info:
System:
OS: Linux 5.4 Ubuntu 20.04.6 LTS (Focal Fossa)
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.14.0/bin/yarn
npm: 9.4.2 - ~/.nvm/versions/node/v18.14.0/bin/npm
SDKs:
Android SDK:
API Levels: 28, 29, 33, 34
Build Tools: 30.0.3, 33.0.2, 34.0.0
System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-33 | Google APIs Intel x86_64 Atom, android-33 | Google Play Intel x86_64 Atom
npmPackages:
expo: ^49.0.8 => 49.0.8
react: 18.2.0 => 18.2.0
react-native: 0.72.4 => 0.72.4
Expo Workflow: managed

Error output

[Error: EACCES: permission denied, scandir '/a/directory/outside/the/root/dir/that/eas.json/is/in'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: ''/a/directory/outside/the/root/dir/that/eas.json/is/in"
}
Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

create a project with directory structure

--A
----C <=== make this folder not accessible to currently logged in user.
----B
------eas.json

rn project is located in folder B. Try to build project. It will try to scan C and give error. Is that expected? C has no relation to rn project in B which contains the entire rn project.

@janusqa janusqa added the needs review Issue is ready to be reviewed by a maintainer label Oct 2, 2023
@theafolayan
Copy link

Just here to say that '/a/directory/outside/the/root/dir/that/eas.json/is/in' is hilarious 😆

@janusqa
Copy link
Author

janusqa commented Oct 7, 2023

I came across this gem
https://github.com/expo/fyi/blob/main/eas-build-archive.md#how-can-i-upload-files-to-eas-build-if-they-are-gitignored
Very helpful
So the root directory is not the directory with the "eas.json" but with the ".git" folder.
I used the "easignore" (although not recommended) but eas was not processing "gitignore" how I expected but "easignore" did.
One thing that I missed is that it goes into the folder where ".git" lives and not necessarily where the "eas.json" lives

@janusqa janusqa closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants