"Permission denied" error in eas build during Install dependencies phase

I’m attempting to upgrade my build from classic to eas. iOS builds seem to be working fine. However, I’m getting the following error during the “Install dependencies” step of my Android builds:

[stderr] ERR! code 127
[stderr] npm ERR! path /root/workingdir/build/src/front/node_modules/@sentry/cli
[stderr] npm ERR!
[stderr] command failed
[stderr] npm ERR! command sh -c node scripts/install.js
[stderr] npm ERR! sh: 1: node: Permission denied
[stderr] 
[stderr] npm ERR! A complete log of this run can be found in:
[stderr] npm ERR!     /root/.npm/_logs/2021-12-03T23_50_19_378Z-debug.log
npm exited with non-zero code: 127

I’m not certain that it’s related to sentry but just in case, I’ve verified that my set-up matches their documentation. I don’t even have @sentry/cli in my dependencies; I assume that it’s a dependency of sentry-expo or @sentry/react-native.

What I have tried so far:

  • Tried default and latest Android runners

workflow: managed
eas-cli version: 0.38.3

After a bit more digging, I wonder if it is related to this issue from @sentry/cli.

It seems like @sentry/cli is looking for a npm_config_cache environment variable and falling back to the user’s home directory if it doesn’t exist.

I can try setting that env var but I’m not sure what directory on the runner would work. Does anyone have any ideas?

I believe that I have my issue solved. I realized that I was running my local project at node v16 but the latest build image on eas was at v14. I downgraded my local node and ran npm ci and then pushed another build on eas and it appears to be working.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.