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

BUG: @remix-run/server-runtime peer dependency not compatible with remix v2 #39

Closed
setvik opened this issue Oct 10, 2023 · 0 comments
Closed

Comments

@setvik
Copy link
Contributor

setvik commented Oct 10, 2023

How to reproduce:

Step 1: Setup a fresh Remix project and install zodix

npx create-remix/latest
cd remix
npm i zodix

Expected behavior:

added 1 package, and audited 831 packages in 1s

246 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Actual behavior:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: remix@undefined
npm ERR! Found: @remix-run/server-runtime@2.0.1
npm ERR! node_modules/@remix-run/server-runtime
npm ERR!   @remix-run/server-runtime@"2.0.1" from @remix-run/dev@2.0.1
npm ERR!   node_modules/@remix-run/dev
npm ERR!     dev @remix-run/dev@"^2.0.1" from the root project
npm ERR!   @remix-run/server-runtime@"2.0.1" from @remix-run/node@2.0.1
npm ERR!   node_modules/@remix-run/node
npm ERR!     @remix-run/node@"2.0.1" from @remix-run/express@2.0.1
npm ERR!     node_modules/@remix-run/express
npm ERR!       @remix-run/express@"2.0.1" from @remix-run/serve@2.0.1
npm ERR!       node_modules/@remix-run/serve
npm ERR!         peerOptional @remix-run/serve@"^2.0.1" from @remix-run/dev@2.0.1
npm ERR!         node_modules/@remix-run/dev
npm ERR!         1 more (the root project)
npm ERR!     @remix-run/node@"2.0.1" from @remix-run/serve@2.0.1
npm ERR!     node_modules/@remix-run/serve
npm ERR!       peerOptional @remix-run/serve@"^2.0.1" from @remix-run/dev@2.0.1
npm ERR!       node_modules/@remix-run/dev
npm ERR!         dev @remix-run/dev@"^2.0.1" from the root project
npm ERR!       1 more (the root project)
npm ERR!     1 more (the root project)
npm ERR!   1 more (@remix-run/react)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! zodix@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @remix-run/server-runtime@1.19.3
npm ERR! node_modules/@remix-run/server-runtime
npm ERR!   peer @remix-run/server-runtime@"1.x" from zodix@0.4.3
npm ERR!   node_modules/zodix
npm ERR!     zodix@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Workaround

npm i zodix --legacy-peer-deps

Issue and fix:

The @remix-run/server-runtime peer-dependency in package.json only supports 1.x. Updating to the following should fix.

  "peerDependencies": {
    "@remix-run/server-runtime": "1.x || 2.x",
    ...
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants