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

@nx/expo:build for eas local is failing with yarn v4. Unknown error. See logs of the Install dependencies build phase for more information. #28121

Closed
1 of 4 tasks
alifa20 opened this issue Sep 26, 2024 · 2 comments · Fixed by #28603
Assignees
Labels
outdated scope: react-native Issues relating to React Native type: bug

Comments

@alifa20
Copy link

alifa20 commented Sep 26, 2024

Current Behavior

Eas local build is failing and cannot proceed.

Expected Behavior

Should be able to build with EAS locally.

GitHub Repo

https://github.com/alifa20/issue-demos/tree/main/nx-expo-eas-issue

Steps to Reproduce

  1. create a new workspace, or git clone https://github.com/alifa20/issue-demos && cd nx-expo-eas-issue
  2. yarn install
  3. yarn nx run nx-expo-app:build:ios:local

Nx Report

NX   Report complete - copy this into the issue template

Node           : 20.16.0
OS             : darwin-arm64
Native Target  : aarch64-macos
yarn           : 4.5.0

nx (global)        : 19.8.0
nx                 : 19.8.2
@nx/js             : 19.8.2
@nx/jest           : 19.8.2
@nx/linter         : 19.8.2
@nx/eslint         : 19.8.2
@nx/workspace      : 19.8.2
@nx/devkit         : 19.8.2
@nx/eslint-plugin  : 19.8.2
@nx/expo           : 19.8.2
@nx/react          : 19.8.2
@nrwl/tao          : 19.8.2
@nx/web            : 19.8.2
@nx/webpack        : 19.8.2
typescript         : 5.3.3
---------------------------------------
Registered Plugins:
@nx/expo/plugin
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

[INSTALL_DEPENDENCIES] Running "yarn install" in /var/folders/hn/s06rnn710y73bfpg0jrspkh80000gn/T/eas-build-local-nodejs/981bb4cd-f219-4b30-b0f9-7fa6e78dd6d6/build/nx-expo-eas-issue/apps/nx-expo-app directory
[INSTALL_DEPENDENCIES] ➤ YN0000: · Yarn 4.5.0
[INSTALL_DEPENDENCIES] ➤ YN0000: ┌ Resolution step
[INSTALL_DEPENDENCIES] ➤ YN0085: │ - @nx-expo-app-org/source@workspace:.
[INSTALL_DEPENDENCIES] ➤ YN0000: └ Completed
[INSTALL_DEPENDENCIES] ➤ YN0000: ┌ Post-resolution validation
[INSTALL_DEPENDENCIES] ➤ YN0060: │ eslint is listed by your project with version 9.11.1 (pb1026), which doesn't satisfy what eslint-plugin-import and other dependencies request (^8.0.0).
[INSTALL_DEPENDENCIES] ➤ YN0002: │ nx-expo-app@workspace:. doesn't provide @babel/core (pca629), requested by babel-jest and other dependencies.
[INSTALL_DEPENDENCIES] ➤ YN0002: │ nx-expo-app@workspace:. doesn't provide @typescript-eslint/parser (p14fad), requested by @nx/eslint-plugin and other dependencies.
[INSTALL_DEPENDENCIES] ➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
[INSTALL_DEPENDENCIES] ➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
[INSTALL_DEPENDENCIES] ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
[INSTALL_DEPENDENCIES] ➤ YN0000: └ Completed
[INSTALL_DEPENDENCIES] ➤ YN0000: · Failed with errors in 0s 214ms
[INSTALL_DEPENDENCIES]
Error: yarn install exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:634:26)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:339:12)
    ...
    at spawnAsync (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawn (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
    at installDependenciesAsync (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/common/installDependencies.js:24:50)
    at async runInstallDependenciesAsync (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/common/setup.js:148:50)
    at async /Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/common/setup.js:57:9
    at async BuildContext.runBuildPhase (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/context.js:107:28)
    at async setupAsync (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/common/setup.js:56:5)
    at async buildAsync (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/builders/ios.js:47:5)
    at async runBuilderWithHooksAsync (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.iosBuilder (/Users/ali/.npm/_npx/93986e4ba4ec11e8/node_modules/@expo/build-tools/dist/builders/ios.js:33:16)

Build failed
Unknown error. See logs of the Install dependencies build phase for more information.
npx exited with non-zero code: 1
    Error: build command failed.

 NX   1



—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Ran target build:ios:local for project nx-expo-app (25s)

Package Manager Version

yarn 4.5.0

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

NX 19.6.4 was working fine and this workaround ^ seemed to be working, but the new version of NX has caused issues.

I tried running the following code from the root:

node tools/scripts/eas-build-pre-install.mjs . apps/nx-expo-app && cp yarn.lock apps/nx-expo-app/

But still no success

@jaysoo jaysoo added the scope: react-native Issues relating to React Native label Oct 14, 2024
@xiongemi
Copy link
Collaborator

i created a pr in your repo: alifa20/issue-demos#2

To summarize:
I think the issue is that with yarn 4, it does not allow installation with the current structure if it is not a yarn workspace.
to workaround, I move the yarn.lock from root to project so yarn install can be ran. however, there is going to be changes in yarn.lock file and that failed yarn install. you can add .env and set YARN_ENABLE_IMMUTABLE_INSTALLS=false.

jaysoo pushed a commit that referenced this issue Nov 1, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #28121
jaysoo pushed a commit that referenced this issue Nov 1, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #28121
Copy link

github-actions bot commented Dec 3, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: react-native Issues relating to React Native type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants