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

Cannot be used with Next.js canary releases #15

Closed
mordechaim opened this issue Jan 19, 2024 · 4 comments
Closed

Cannot be used with Next.js canary releases #15

mordechaim opened this issue Jan 19, 2024 · 4 comments

Comments

@mordechaim
Copy link

There's a dependency resolution error when trying to use this library with Next.js canary:

npm ERR! code ERESOLVE
--
22:37:29.375 | npm ERR! ERESOLVE could not resolve
22:37:29.375 | npm ERR!
22:37:29.376 | npm ERR! While resolving: [email protected]
22:37:29.376 | npm ERR! Found: [email protected]
22:37:29.376 | npm ERR! node_modules/next
22:37:29.376 | npm ERR!   next@"^14.1.1-canary.0" from the root project
22:37:29.376 | npm ERR!
22:37:29.376 | npm ERR! Could not resolve dependency:
22:37:29.376 | npm ERR! peer next@">= 13.0.0" from [email protected]
22:37:29.376 | npm ERR! node_modules/next-client-cookies
22:37:29.376 | npm ERR!   next-client-cookies@"^1.1.0" from the root project
22:37:29.376 | npm ERR!
22:37:29.376 | npm ERR! Conflicting peer dependency: [email protected]
22:37:29.377 | npm ERR! node_modules/next
22:37:29.377 | npm ERR!   peer next@">= 13.0.0" from [email protected]
22:37:29.377 | npm ERR!   node_modules/next-client-cookies
22:37:29.377 | npm ERR!     next-client-cookies@"^1.1.0" from the root project
22:37:29.377 | npm ERR!
22:37:29.377 | npm ERR! Fix the upstream dependency conflict, or retry
22:37:29.377 | npm ERR! this command with --force or --legacy-peer-deps
22:37:29.377 | npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I currently use --legacy-peer-deps, but this only works locally, not when deploying to Vercel (where I can't set this flag)

@mordechaim
Copy link
Author

I figured you could provide --legacy-peer-deps flag to Vercel, in the build settings; by overriding the default Build command

@moshest
Copy link
Owner

moshest commented Jan 19, 2024

Can you suggest what's the peerDependency value should be?

@mordechaim
Copy link
Author

Seems like nothing 🤦‍♀️, didn't know that semver doesn't match prereleases.

@moshest
Copy link
Owner

moshest commented Jan 19, 2024

That's what I remembered. Thanks for verifying.

I'm closing this for now as there is nothing else we can do here.

@moshest moshest closed this as completed Jan 19, 2024
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