dependency conflict between zustand and react when using nextjs 15 stable version in production build #2840
Unanswered
aungchanpyae33
asked this question in
Bug report
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
hi, first of all i really love zustand and i helps me alot with my on going projects.But when it comes to upgrade next 15 stable version , i face error with zustand.
I am testing React (19.0.0-rc), Next.js (15.0.3), and Zustand (5.0.1) and it may work in local as installing zustand with --force but not work in production building.
This is my error output after
[21:21:37.965] Running "vercel build"
[21:21:38.379] Vercel CLI 37.14.0
[21:21:38.850] Installing dependencies...
[21:21:39.881] npm error code ERESOLVE
[21:21:39.883] npm error ERESOLVE could not resolve
[21:21:39.883] npm error
[21:21:39.883] npm error While resolving: zustand@5.0.1
[21:21:39.883] npm error Found: react@19.0.0-rc-66855b96-20241106
[21:21:39.883] npm error node_modules/react
[21:21:39.883] npm error react@"19.0.0-rc-66855b96-20241106" from the root project
[21:21:39.883] npm error peer react@"^18.2.0 || 19.0.0-rc-66855b96-20241106" from next@15.0.3
[21:21:39.883] npm error node_modules/next
[21:21:39.884] npm error next@"15.0.3" from the root project
[21:21:39.884] npm error 2 more (react-dom, styled-jsx)
[21:21:39.884] npm error
[21:21:39.884] npm error Could not resolve dependency:
[21:21:39.884] npm error peerOptional react@">=18.0.0" from zustand@5.0.1
[21:21:39.884] npm error node_modules/zustand
[21:21:39.884] npm error zustand@"^5.0.1" from the root project
[21:21:39.884] npm error
[21:21:39.884] npm error Conflicting peer dependency: react@18.3.1
[21:21:39.884] npm error node_modules/react
[21:21:39.885] npm error peerOptional react@">=18.0.0" from zustand@5.0.1
[21:21:39.885] npm error node_modules/zustand
[21:21:39.885] npm error zustand@"^5.0.1" from the root project
[21:21:39.885] npm error
[21:21:39.885] npm error Fix the upstream dependency conflict, or retry
[21:21:39.885] npm error this command with --force or --legacy-peer-deps
[21:21:39.885] npm error to accept an incorrect (and potentially broken) dependency resolution.
[21:21:39.885] npm error
[21:21:39.885] npm error
[21:21:39.885] npm error For a full report see:
[21:21:39.885] npm error /vercel/.npm/_logs/2024-11-07T14_51_38_964Z-eresolve-report.txt
[21:21:39.885] npm error A complete log of this run can be found in: /vercel/.npm/_logs/2024-11-07T14_51_38_964Z-debug-0.log
[21:21:39.899] Error: Command "npm install" exited with 1
[21:21:40.093]
i am wondering why no one is talking about this behavior in production.
Reproduction Link
https://stackblitz.com/~/github.com/aungchanpyae33/test-zustand-with-next15
Beta Was this translation helpful? Give feedback.
All reactions