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

Yarn installation error on create-nx-workspace and Expo setup due to peer dependencies are incorrectly met #26257

Closed
1 of 4 tasks
guillempuche opened this issue May 30, 2024 · 5 comments
Assignees
Labels
outdated scope: react-native Issues relating to React Native type: bug

Comments

@guillempuche
Copy link

guillempuche commented May 30, 2024

Current Behavior

I could be because of Yarn's node-linker as PnP.

Creating the repo with npm works fine.

npx create-nx-workspace test-nx-expo --name=text-expo --pm yarn
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

 NX   Let's create a new workspace [https://nx.dev/getting-started/intro]

✔ Which stack do you want to use? · react
✔ What framework would you like to use? · expo
✔ Application name · test-nx-expo
✔ Do you want Nx Cloud to make your CI fast? · skip

 NX   Creating your v19.1.1 workspace.

✔ Installing dependencies with yarn
✖ Creating your workspace in test-nx-expo

 NX   Failed to create a workspace.

Exit code: 1
Log file: /var/folders/ys/spt316fs5sxck01gjy40s1rc0000gn/T/tmp-60199-FHb29CbVYbMt/error.log

guillem@guillem-laptop:~/programacio/codi/testing
 $ cat /var/folders/ys/spt316fs5sxck01gjy40s1rc0000gn/T/tmp-60199-FHb29CbVYbMt/error.log
➤ YN0000: Downloading https://repo.yarnpkg.com/4.1.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-4.1.1.cjs
➤ YN0000: Done in 0s 559ms
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @nx/expo@npm:19.1.1, @nx/workspace@npm:19.1.1, nx@npm:19.1.1, @adobe/css-tools@npm:4.3.3, @ampproject/remapping@npm:2.3.0, @babel/code-frame@npm:7.24.6, and 998 more.
➤ YN0000: └ Completed in 3s 48ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 87 packages were added to the project (+ 17.96 MiB).
➤ YN0000: └ Completed in 0s 966ms
➤ YN0000: ┌ Link step
➤ YN0007: │ nx@npm:19.1.1 [57c3c] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 2s 883ms
➤ YN0000: · Done in 6s 986ms

 NX  Generating @nx/workspace:preset

Fetching prettier...
Fetching @nx/detox...
CREATE tsconfig.base.json
CREATE .prettierrc
CREATE .prettierignore
UPDATE .vscode/extensions.json
UPDATE package.json
UPDATE .gitignore
UPDATE nx.json
CREATE babel.config.json
CREATE apps/test-nx-expo/.babelrc.js
CREATE apps/test-nx-expo/app.json
CREATE apps/test-nx-expo/assets/adaptive-icon.png
CREATE apps/test-nx-expo/assets/favicon.png
CREATE apps/test-nx-expo/assets/icon.png
CREATE apps/test-nx-expo/assets/splash.png
CREATE apps/test-nx-expo/eas.json
CREATE apps/test-nx-expo/index.js
CREATE apps/test-nx-expo/metro.config.js
CREATE apps/test-nx-expo/package.json
CREATE apps/test-nx-expo/src/app/App.spec.tsx
CREATE apps/test-nx-expo/src/app/App.tsx
CREATE apps/test-nx-expo/tsconfig.app.json
CREATE apps/test-nx-expo/tsconfig.json
CREATE apps/test-nx-expo/webpack.config.js
CREATE apps/test-nx-expo/project.json
CREATE .eslintrc.json
CREATE .eslintignore
CREATE apps/test-nx-expo/.eslintrc.json
CREATE jest.preset.js
CREATE jest.config.ts
CREATE apps/test-nx-expo/jest.config.ts
CREATE apps/test-nx-expo/src/test-setup.ts
CREATE apps/test-nx-expo/tsconfig.spec.json
CREATE apps/test-nx-expo-e2e/.babelrc
CREATE apps/test-nx-expo-e2e/.detoxrc.json
CREATE apps/test-nx-expo-e2e/jest.config.json
CREATE apps/test-nx-expo-e2e/src/app.spec.ts
CREATE apps/test-nx-expo-e2e/test-setup.ts
CREATE apps/test-nx-expo-e2e/tsconfig.e2e.json
CREATE apps/test-nx-expo-e2e/tsconfig.json
CREATE apps/test-nx-expo-e2e/project.json
CREATE apps/test-nx-expo-e2e/.eslintrc.json
CREATE tools/scripts/eas-build-pre-install.mjs
CREATE tools/scripts/eas-build-post-install.mjs
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @config-plugins/detox@npm:7.0.0, @expo/cli@npm:0.17.12, @expo/metro-config@npm:0.17.7, @expo/metro-runtime@npm:3.1.3, @nx/detox@npm:19.1.1, and 640 more.
➤ YN0000: └ Completed in 4s 305ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ @test-nx-expo/source@workspace:. doesn't provide @babel/core (p61bb3), requested by babel-jest.
➤ YN0002: │ @test-nx-expo/source@workspace:. doesn't provide @react-native/babel-preset (peee3c), requested by @expo/metro-config.
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 103 packages were added to the project (+ 122.69 MiB).
➤ YN0000: └ Completed in 4s 242ms
➤ YN0000: ┌ Link step
➤ YN0007: │ @swc/core@npm:1.5.20 [3477d] must be built because it never has been before or the last one failed
➤ YN0007: │ dtrace-provider@npm:0.8.8 must be built because it never has been before or the last one failed
➤ YN0009: │ @swc/core@npm:1.5.20 [3477d] couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/ys/spt316fs5sxck01gjy40s1rc0000gn/T/xfs-8ccb3e9a/build.log)
➤ YN0007: │ detox@npm:20.18.5 [3477d] must be built because it never has been before or the last one failed
➤ YN0007: │ nx@npm:19.1.1 [3477d] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 11s 824ms
➤ YN0000: · Failed with errors in 20s 541ms

 NX   Command failed: yarn

Pass --verbose to see the stacktrace.


 NX   Workspace creation failed, see above.

Pass --verbose to see the stacktrace.

Expected Behavior

Create a monorepo with Expo app.

GitHub Repo

No response

Steps to Reproduce

  1. Start a new monorepo with npx create-nx-workspace test-nx-expo --name=text-expo --pm yarn
  2. Follow these settings:
✔ Which stack do you want to use? · react
✔ What framework would you like to use? · expo
✔ Application name · test-nx-expo
✔ Do you want Nx Cloud to make your CI fast? · skip
  1. You get the error

Nx Report

Failure Logs

➤ YN0000: Downloading https://repo.yarnpkg.com/4.1.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-4.1.1.cjs
➤ YN0000: Done in 0s 559ms
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @nx/expo@npm:19.1.1, @nx/workspace@npm:19.1.1, nx@npm:19.1.1, @adobe/css-tools@npm:4.3.3, @ampproject/remapping@npm:2.3.0, @babel/code-frame@npm:7.24.6, and 998 more.
➤ YN0000: └ Completed in 3s 48ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 87 packages were added to the project (+ 17.96 MiB).
➤ YN0000: └ Completed in 0s 966ms
➤ YN0000: ┌ Link step
➤ YN0007: │ nx@npm:19.1.1 [57c3c] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 2s 883ms
➤ YN0000: · Done in 6s 986ms

 NX  Generating @nx/workspace:preset

Fetching prettier...
Fetching @nx/detox...
CREATE tsconfig.base.json
CREATE .prettierrc
CREATE .prettierignore
UPDATE .vscode/extensions.json
UPDATE package.json
UPDATE .gitignore
UPDATE nx.json
CREATE babel.config.json
CREATE apps/test-nx-expo/.babelrc.js
CREATE apps/test-nx-expo/app.json
CREATE apps/test-nx-expo/assets/adaptive-icon.png
CREATE apps/test-nx-expo/assets/favicon.png
CREATE apps/test-nx-expo/assets/icon.png
CREATE apps/test-nx-expo/assets/splash.png
CREATE apps/test-nx-expo/eas.json
CREATE apps/test-nx-expo/index.js
CREATE apps/test-nx-expo/metro.config.js
CREATE apps/test-nx-expo/package.json
CREATE apps/test-nx-expo/src/app/App.spec.tsx
CREATE apps/test-nx-expo/src/app/App.tsx
CREATE apps/test-nx-expo/tsconfig.app.json
CREATE apps/test-nx-expo/tsconfig.json
CREATE apps/test-nx-expo/webpack.config.js
CREATE apps/test-nx-expo/project.json
CREATE .eslintrc.json
CREATE .eslintignore
CREATE apps/test-nx-expo/.eslintrc.json
CREATE jest.preset.js
CREATE jest.config.ts
CREATE apps/test-nx-expo/jest.config.ts
CREATE apps/test-nx-expo/src/test-setup.ts
CREATE apps/test-nx-expo/tsconfig.spec.json
CREATE apps/test-nx-expo-e2e/.babelrc
CREATE apps/test-nx-expo-e2e/.detoxrc.json
CREATE apps/test-nx-expo-e2e/jest.config.json
CREATE apps/test-nx-expo-e2e/src/app.spec.ts
CREATE apps/test-nx-expo-e2e/test-setup.ts
CREATE apps/test-nx-expo-e2e/tsconfig.e2e.json
CREATE apps/test-nx-expo-e2e/tsconfig.json
CREATE apps/test-nx-expo-e2e/project.json
CREATE apps/test-nx-expo-e2e/.eslintrc.json
CREATE tools/scripts/eas-build-pre-install.mjs
CREATE tools/scripts/eas-build-post-install.mjs
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @config-plugins/detox@npm:7.0.0, @expo/cli@npm:0.17.12, @expo/metro-config@npm:0.17.7, @expo/metro-runtime@npm:3.1.3, @nx/detox@npm:19.1.1, and 640 more.
➤ YN0000: └ Completed in 4s 305ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ @test-nx-expo/source@workspace:. doesn't provide @babel/core (p61bb3), requested by babel-jest.
➤ YN0002: │ @test-nx-expo/source@workspace:. doesn't provide @react-native/babel-preset (peee3c), requested by @expo/metro-config.
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 103 packages were added to the project (+ 122.69 MiB).
➤ YN0000: └ Completed in 4s 242ms
➤ YN0000: ┌ Link step
➤ YN0007: │ @swc/core@npm:1.5.20 [3477d] must be built because it never has been before or the last one failed
➤ YN0007: │ dtrace-provider@npm:0.8.8 must be built because it never has been before or the last one failed
➤ YN0009: │ @swc/core@npm:1.5.20 [3477d] couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/ys/spt316fs5sxck01gjy40s1rc0000gn/T/xfs-8ccb3e9a/build.log)
➤ YN0007: │ detox@npm:20.18.5 [3477d] must be built because it never has been before or the last one failed
➤ YN0007: │ nx@npm:19.1.1 [3477d] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 11s 824ms
➤ YN0000: · Failed with errors in 20s 541ms

 NX   Command failed: yarn

Pass --verbose to see the stacktrace.


 NX   Workspace creation failed, see above.

Pass --verbose to see the stacktrace.

Package Manager Version

yarn 4.1.1

Operating System

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

Additional Information

No response

@guillempuche guillempuche changed the title create-nx-workspace and Expo setup error due to peer dependencies are incorrectly met Installation error oncreate-nx-workspace and Expo setup due to peer dependencies are incorrectly met May 30, 2024
@guillempuche guillempuche changed the title Installation error oncreate-nx-workspace and Expo setup due to peer dependencies are incorrectly met Installation error on create-nx-workspace and Expo setup due to peer dependencies are incorrectly met May 30, 2024
@guillempuche guillempuche changed the title Installation error on create-nx-workspace and Expo setup due to peer dependencies are incorrectly met Installation error on create-nx-workspace and Expo setup due to peer dependencies are incorrectly met in Yarn May 30, 2024
@guillempuche guillempuche changed the title Installation error on create-nx-workspace and Expo setup due to peer dependencies are incorrectly met in Yarn Yarn installation error on create-nx-workspace and Expo setup due to peer dependencies are incorrectly met May 30, 2024
@JeremiahKoeiman
Copy link

JeremiahKoeiman commented Jun 1, 2024

These issues also occur when using npm on Windows. This happens with every package I try to install. Are there any updates for this issue?

I get the following error when trying to install any package:
image

@JeremiahKoeiman
Copy link

I've just upgraded the following 2 packages with these versions:
"@swc-node/register": "1.9.1"
"@swc/core": "1.5.23"

After doing this, I was able to install other packages again. @guillempuche maybe this will work for you too (as a temporary solution)

@guillempuche
Copy link
Author

Thanks for offering a solution, @JeremiahKoeiman. Let's see if the Nx team fixes it.

@FrozenPandaz FrozenPandaz added the scope: react-native Issues relating to React Native label Jun 3, 2024
@xiongemi
Copy link
Collaborator

xiongemi commented Jun 5, 2024

i think there are 2 packages with dependency errors:

it should be fixed in nx 19.2.0
let me know if you still got dependency error

@xiongemi xiongemi closed this as completed Jun 6, 2024
Copy link

github-actions bot commented Jul 8, 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 Jul 8, 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

No branches or pull requests

4 participants