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

Can't install after generating @nx/remix app due to conflicting peer dependency for vite #26082

Closed
1 of 4 tasks
thdk opened this issue May 25, 2024 · 2 comments
Closed
1 of 4 tasks

Comments

@thdk
Copy link
Contributor

thdk commented May 25, 2024

Current Behavior

Currently @nx/vite has a peer dependency on vite pinned to ~5.0.0 while @remix-run/dev has a peerDependency pinned to ^5.1.0.

❯ npm i
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @remix-run/dev@2.9.2
npm error Found: vite@5.0.13
npm error node_modules/vite
npm error   dev vite@"~5.0.0" from the root project
npm error   peer vite@"^5.0.0" from @nx/vite@19.1.0
npm error   node_modules/@nx/vite
npm error     dev @nx/vite@"19.1.0" from the root project
npm error     @nx/vite@"19.1.0" from @nrwl/vite@19.1.0
npm error     node_modules/@nrwl/vite
npm error       @nrwl/vite@"19.1.0" from @nx/vite@19.1.0
npm error   4 more (@vanilla-extract/integration, @vitejs/plugin-react, ...)
npm error
npm error Could not resolve dependency:
npm error peerOptional vite@"^5.1.0" from @remix-run/dev@2.9.2
npm error node_modules/@remix-run/dev
npm error   dev @remix-run/dev@"^2.8.1" from the root project
npm error
npm error Conflicting peer dependency: vite@5.2.11
npm error node_modules/vite
npm error   peerOptional vite@"^5.1.0" from @remix-run/dev@2.9.2
npm error   node_modules/@remix-run/dev
npm error     dev @remix-run/dev@"^2.8.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/thdk/.npm/_logs/2024-05-25T18_26_53_935Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/thdk/.npm/_logs/2024-05-25T18_26_53_935Z-debug-0.log
❯ npm ls vite
npm error code ELSPROBLEMS
npm error invalid: vite@5.0.13 /Users/thdk/repos/thdk/nx/nx-remix-docker/node_modules/vite
@nx-remix-docker/source@0.0.0 /Users/thdk/repos/thdk/nx/nx-remix-docker
├─┬ @nx/vite@19.1.0
│ └── vite@5.0.13 deduped
├─┬ @remix-run/dev@2.9.2
│ ├─┬ @vanilla-extract/integration@6.5.0
│ │ └── vite@5.0.13 deduped invalid: "^5.1.0" from node_modules/@remix-run/dev
│ └── vite@5.0.13 deduped invalid: "^5.1.0" from node_modules/@remix-run/dev
├─┬ @vitejs/plugin-react@4.3.0
│ └── vite@5.0.13 deduped invalid: "^5.1.0" from node_modules/@remix-run/dev
├── vite@5.0.13 invalid: "^5.1.0" from node_modules/@remix-run/dev
└─┬ vitest@1.6.0
  ├─┬ vite-node@1.6.0
  │ └── vite@5.0.13 deduped invalid: "^5.1.0" from node_modules/@remix-run/dev
  └── vite@5.0.13 deduped invalid: "^5.1.0" from node_modules/@remix-run/dev

npm error A complete log of this run can be found in: /Users/thdk/.npm/_logs/2024-05-25T18_41_17_788Z-debug-0.log

Expected Behavior

Since @remix-run/dev is automatically installed when generating a remix app with @nx/remix:application and both @nx/vite and @nx/remix are installed from the same nx version 19.1.0 I do expect the peer dependency ranges to be compatible.

GitHub Repo

https://github.com/thdk/nx-remix-gcp/tree/779620aa3ca3714d78ac864cad4e4c6c5f3ed8ec

Steps to Reproduce

npx create-nx-workspace@latest --ci skip nx-remix

✔ Which stack do you want to use? · none
✔ Package-based monorepo, integrated monorepo, or standalone project? · integrated

cd nx-remix

npm i -D @nx/remix

npx nx g @nx/remix:application \
  --directory apps/remix-app \
  --name remix-app \
  --projectNameAndRootFormat as-provided \
  --unitTestRunner vitest \
  --e2eTestRunner playwright
 
npm install

Nx Report

Node   : 22.2.0
OS     : darwin-arm64
npm    : 10.8.0

nx                 : 19.1.0
@nx/js             : 19.1.0
@nx/linter         : 19.1.0
@nx/eslint         : 19.1.0
@nx/workspace      : 19.1.0
@nx/devkit         : 19.1.0
@nx/eslint-plugin  : 19.1.0
@nx/playwright     : 19.1.0
@nx/react          : 19.1.0
@nx/remix          : 19.1.0
@nrwl/tao          : 19.1.0
@nx/vite           : 19.1.0
@nx/web            : 19.1.0
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/remix/plugin
@nx/vite/plugin
@nx/eslint/plugin
@nx/playwright/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

The version of vite was pinned by this PR: #21740

@Coly010
Copy link
Contributor

Coly010 commented Jun 7, 2024

Fixed by: #26324

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.
Projects
None yet
Development

No branches or pull requests

3 participants