expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
757 stars 79 forks source link

eas-build-pre-install hook with `node ./scripts/our-script.js` errors #2417

Closed Nantris closed 1 month ago

Nantris commented 2 months ago

Build/Submit details page URL

No response

Summary

[PRE_INSTALL_HOOK] Error: Cannot find module '/private/var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/b4e3b650-3761-4ee0-99e0-610a46e416b2/build/scripts/our-script.js'

Managed or bare?

Managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: Linux 6.5 Ubuntu 23.10 23.10 (Mantic Minotaur)
      Shell: 5.9 - /usr/bin/zsh
    Binaries:
      Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
      Yarn: 1.22.22 - ~/.nvm/versions/node/v20.11.0/bin/yarn
      npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
      Watchman: 4.9.0 - /usr/bin/watchman
    SDKs:
      Android SDK:
        API Levels: 31, 32
        Build Tools: 30.0.3, 31.0.0, 33.0.0, 33.0.1, 34.0.0, 35.0.0
        System Images: android-31 | Google APIs Intel x86_64 Atom, android-31 | Google Play Intel x86 Atom_64
    npmPackages:
      expo: ~51.0.11 => 51.0.11 
      react-native: ~0.74.2 => 0.74.2 
    npmGlobalPackages:
      eas-cli: 7.5.0
      expo-cli: 6.3.10
    Expo Workflow: managed

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Not available at this time

szdziedzic commented 2 months ago

What do you see if you do ls in the pre-install hook?

Nantris commented 2 months ago

Thanks for your reply. Sorry, let me clarify with some new info I uncovered.

I found that it works fine with eas --local, but on the cloud build it fails to find the file. Unfortunately I cannot easily test the cloud behavior since we're already approaching our build limit. Do you have any advice? Can I somehow short-circuit the build so I could run ls and not burn through the remaining limit?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.