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

Error on eas local build - yarn looks for workspace app in yarn registry #2523

Open
arielAzarconColcap opened this issue Aug 29, 2024 · 0 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@arielAzarconColcap
Copy link

arielAzarconColcap commented Aug 29, 2024

Build/Submit details page URL

No response

Summary

Good day,

I'm still debating whether to raise this on yarn or here in eas-cli, but I'm leaning towards raising this issue here.

Converting our app into utilizing workspaces, I have a package.json for workspace not-app-main that looks like this:
"dependencies": { "app-main": "1.0.0" }, "scripts": { "build:local-android": "eas build --profile development --platform android --local" },
where app-main is another workspace

manual yarn install works fine, and also yarn workspace not-app-main install.

However, when I do EAS_NO_VCS=1 yarn workspace not-app-main run build:local-android,
there's an error during yarn install that happens in [INSTALL_DEPENDENCIES] phase:

`
[INSTALL_DEPENDENCIES] Running "yarn install" in /tmp/root/eas-build-local-nodejs/08303206-994f-4df6-aab6-9cb973f7c174/build directory

[INSTALL_DEPENDENCIES] yarn install v1.22.22

[INSTALL_DEPENDENCIES] info No lockfile found.

[INSTALL_DEPENDENCIES] [1/4] Resolving packages...

[INSTALL_DEPENDENCIES] error Error: https://registry.yarnpkg.com/app-main: Not found

[INSTALL_DEPENDENCIES] at params.callback [as _callback] (/usr/lib/node_modules/yarn/lib/cli.js:66680:18)

[INSTALL_DEPENDENCIES] at self.callback (/usr/lib/node_modules/yarn/lib/cli.js:141410:22)

[INSTALL_DEPENDENCIES] at Request.emit (node:events:520:28)

[INSTALL_DEPENDENCIES] at Request. (/usr/lib/node_modules/yarn/lib/cli.js:142382:10)

[INSTALL_DEPENDENCIES] at Request.emit (node:events:520:28)

[INSTALL_DEPENDENCIES] at IncomingMessage. (/usr/lib/node_modules/yarn/lib/cli.js:142304:12)

[INSTALL_DEPENDENCIES] at Object.onceWrapper (node:events:634:28)

[INSTALL_DEPENDENCIES] at IncomingMessage.emit (node:events:532:35)

[INSTALL_DEPENDENCIES] at endReadableNT (node:internal/streams/readable:1696:12)

[INSTALL_DEPENDENCIES] at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

[INSTALL_DEPENDENCIES] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

[INSTALL_DEPENDENCIES] Error: yarn install exited with non-zero code: 1
`

This error is apparently caused by yarn trying to find app-main from the yarn registry, but it can't find it, because it's not there.
Searching for a solution, I found a similar issue in yarn: https://github.com/yarnpkg/yarn/issues/4878
But I cannot apply here the solution there of adding the exact version for the local dependency to be successfully added.

Managed or bare?

Bare

Environment

npx expo-env-info
expo-env-info 1.2.0 environment info: System: OS: Linux 5.15 Ubuntu 24.04 LTS 24.04 LTS (Noble Numbat) Shell: 5.2.21 - /bin/bash Binaries: Node: 22.6.0 - /usr/bin/node Yarn: 1.22.22 - /usr/bin/yarn npm: 10.8.2 - /usr/bin/npm npmPackages: expo: 51.0.22 => 51.0.22 react: 18.2.0 => 18.2.0 react-dom: 18.2.0 => 18.2.0 react-native: 0.74.3 => 0.74.3 react-native-web: ~0.19.6 => 0.19.12 npmGlobalPackages: eas-cli: 11.0.0 Expo Workflow: bare

npx expo-doctor
`
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✖ Check if the project meets version requirements for submission to app stores
✖ Check that native modules use compatible support package versions for installed Expo SDK
Unexpected error while running 'Check that native modules use compatible support package versions for installed Expo SDK' check:
TypeError: fetch failed
✖ Check Expo config (app.json/ app.config.js) schema
Unexpected error while running 'Check Expo config (app.json/ app.config.js) schema' check:
TypeError: fetch failed
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✖ Check that packages match versions required by installed Expo SDK

Detailed check results:

This project appears to be targeting Android API level 33 or lower. To submit your app to the Google Play Store after August 31 2024, you must target Android API level 34 or higher.
Advice: Upgrade to Expo SDK 50 or later, which by default supports Android API level 34 Learn more: https://support.google.com/googleplay/android-developer/answer/11926878?hl=en

(node:2392) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
The following packages should be updated for best compatibility with the installed expo version:
[email protected] - expected version: ~51.0.31
[email protected] - expected version: 0.74.5
[email protected] - expected version: 13.8.6
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.

One or more checks failed, indicating possible issues with the project.
`

I think I also need to add this info here:
I solely use Windows during development, but since eas build does not work on Windows, I'm currently using a linux image on a docker container to see if I can make eas build --local run

Error output

[INSTALL_DEPENDENCIES] Running "yarn install" in /tmp/root/eas-build-local-nodejs/08303206-994f-4df6-aab6-9cb973f7c174/build directory
[INSTALL_DEPENDENCIES] yarn install v1.22.22
[INSTALL_DEPENDENCIES] info No lockfile found.
[INSTALL_DEPENDENCIES] [1/4] Resolving packages...
[INSTALL_DEPENDENCIES] error Error: https://registry.yarnpkg.com/app-main: Not found
[INSTALL_DEPENDENCIES] at params.callback [as _callback] (/usr/lib/node_modules/yarn/lib/cli.js:66680:18)
[INSTALL_DEPENDENCIES] at self.callback (/usr/lib/node_modules/yarn/lib/cli.js:141410:22)
[INSTALL_DEPENDENCIES] at Request.emit (node:events:520:28)
[INSTALL_DEPENDENCIES] at Request. (/usr/lib/node_modules/yarn/lib/cli.js:142382:10)
[INSTALL_DEPENDENCIES] at Request.emit (node:events:520:28)
[INSTALL_DEPENDENCIES] at IncomingMessage. (/usr/lib/node_modules/yarn/lib/cli.js:142304:12)
[INSTALL_DEPENDENCIES] at Object.onceWrapper (node:events:634:28)
[INSTALL_DEPENDENCIES] at IncomingMessage.emit (node:events:532:35)
[INSTALL_DEPENDENCIES] at endReadableNT (node:internal/streams/readable:1696:12)
[INSTALL_DEPENDENCIES] at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
[INSTALL_DEPENDENCIES] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INSTALL_DEPENDENCIES]
Error: yarn install exited with non-zero code: 1
at ChildProcess.completionListener (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
at Object.onceWrapper (node:events:635:26)
at ChildProcess.emit (node:events:520:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
...
at spawnAsync (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
at spawn (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
at installDependenciesAsync (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/common/installDependencies.js:24:50)
at async runInstallDependenciesAsync (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/common/setup.js:148:50)
at async /root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/common/setup.js:57:9
at async BuildContext.runBuildPhase (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/context.js:107:28)
at async setupAsync (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/common/setup.js:56:5)
at async buildAsync (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/builders/android.js:38:5)
at async runBuilderWithHooksAsync (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
at async Object.androidBuilder (/root/.npm/_npx/5e31c5d24a898acf/node_modules/@expo/build-tools/dist/builders/android.js:24:16)

Build failed

Reproducible demo or steps to reproduce from a blank project

  1. In a project, add two workspaces where one workspace (workspace-a) is a dependency of another (workspace-b).
  2. run eas build --local in workspace-b
@arielAzarconColcap arielAzarconColcap added the needs review Issue is ready to be reviewed by a maintainer label Aug 29, 2024
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

3 participants
@arielAzarconColcap and others