I'm encountering a "Permission denied" error when EAS Build tries to run my eas-build-pre-install script during the build process. I have a script set up to install pnpm specifically for Android builds. The script content in scripts/eas-pre-install is:
#!/bin/bash
if [[ "$EAS_BUILD_PLATFORM" == "android" ]]; then
npm install -g [email protected]
pnpm --version
fi
In my package.json, I have defined the eas-build-pre-install script as follows:
"scripts": {
"eas-build-pre-install": "./scripts/eas-pre-install"
}
#!/bin/bash
if [[ "$EAS_BUILD_PLATFORM" == "android" ]]; then
npm install -g [email protected]
pnpm --version
fi
Script 'eas-build-pre-install' is present in package.json, running it...
> [email protected] eas-build-pre-install /home/expo/workingdir/build
> ./scripts/eas-pre-install
sh: 1: ./scripts/eas-pre-install: Permission denied
ELIFECYCLE Command failed with exit code 126.
WARN Local package.json exists, but node_modules missing, did you mean to install?
pnpm run eas-build-pre-install exited with non-zero code: 1
Ensure that the script pre-install has the execute permission. You can use the following command to grant execute permission:
After running this command, try executing your script again.