Next.js Discord

Discord Forum

npm error ERESOLVE could not resolve

Answered
Hackberry nipple gall parasitoid posted this in #help-forum
Open in Discord
Avatar
Hackberry nipple gall parasitoidOP
hi guys, when im deploying the project in next js i have this problem and i dont know how resolve.

[00:38:14.560] Running build in Washington, D.C., USA (East) – iad1
[00:38:14.712] Cloning github.com/rxssj/torriani-frontend (Branch: master, Commit: 960a12b)
[00:38:14.720] Skipping build cache, deployment was triggered without cache.
[00:38:15.300] Cloning completed: 587.689ms
[00:38:15.633] Running "vercel build"
[00:38:16.144] Vercel CLI 39.2.0
[00:38:16.621] Installing dependencies...
[00:38:18.209] npm error code ERESOLVE
[00:38:18.210] npm error ERESOLVE could not resolve
[00:38:18.211] npm error
[00:38:18.211] npm error While resolving: motion@12.0.0-alpha.2
[00:38:18.211] npm error Found: react@18.3.1
[00:38:18.211] npm error node_modules/react
[00:38:18.212] npm error react@"^18.3.1" from the root project
[00:38:18.212] npm error peer react@"^16.8 ^17.0 ^18.0 ^19.0 ^19.0.0-rc" from @radix-ui/react-collection@1.1.0
[00:38:18.212] npm error node_modules/@radix-ui/react-collection
[00:38:18.212] npm error @radix-ui/react-collection@"^1.1.0" from the root project
[00:38:18.212] npm error @radix-ui/react-collection@"1.1.0" from @radix-ui/react-roving-focus@1.1.0
[00:38:18.215] npm error node_modules/@radix-ui/react-roving-focus
[00:38:18.215] npm error @radix-ui/react-roving-focus@"1.1.0" from @radix-ui/react-tabs@1.1.1
[00:38:18.215] npm error node_modules/@radix-ui/react-tabs
[00:38:18.215] npm error @radix-ui/react-tabs@"^1.1.1" from the root project
[00:38:18.215] npm error 20 more (@radix-ui/react-context, ...)
[00:38:18.216] npm error
[00:38:18.216] npm error Could not resolve dependency:
[00:38:18.216] npm error peerOptional react@"^19.0.0-rc.1" from motion@12.0.0-alpha.2
[00:38:18.216] npm error node_modules/motion
[00:38:18.216] npm error motion@"^12.0.0-alpha.2" from the root project
[00:38:18.216] npm error
[00:38:18.216] npm error Conflicting peer dependency: react@19.0.0
[00:38:18.216] npm error node_modules/react
[00:38:18.217] npm error peerOptional react@"^19.0.0-rc.1" from motion@12.0.0-alpha.2
[00:38:18.217] npm error node_modules/motion
[00:38:18.217] npm error motion@"^12.0.0-alpha.2" from the root project
[00:38:18.217] npm error
[00:38:18.217] npm error Fix the upstream dependency conflict, or retry
[00:38:18.217] npm error this command with --force or --legacy-peer-deps
[00:38:18.217] npm error to accept an incorrect (and potentially broken) dependency resolution.
[00:38:18.217] npm error
[00:38:18.218] npm error
[00:38:18.218] npm error For a full report see:
[00:38:18.218] npm error /vercel/.npm/_logs/2024-12-12T23_38_17_026Z-eresolve-report.txt
[00:38:18.218] npm error A complete log of this run can be found in: /vercel/.npm/_logs/2024-12-12T23_38_17_026Z-debug-0.log
[00:38:18.233] Error: Command "npm install" exited with 1
[00:38:18.408]
Answered by chisto
Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities
- you can use
you're free
instead of
you're free
(this is an example)

Error: 'RetroGrid' is defined but never used. @typescript-eslint/no-unused-vars
- you can delete RetroGrid if you are not using it
same with handleLoginLogout, div7Ref and all unused vars

Error: 'entry' is never reassigned. Use 'const' instead. prefer-const
- use const entry, instead of let or var

Error: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
- use correct types instead of any
View full answer

14 Replies

Avatar
try npm install --legacy-peer-deps
Avatar
Hackberry nipple gall parasitoidOP
ok ill try
and what should the output be?
Avatar
Chub mackerel
that worked?
Avatar
Hackberry nipple gall parasitoidOP
i have this as output
Image
Avatar
Hackberry nipple gall parasitoidOP
i resolved because now i have problem about eslint
how can i resolve problem like this? can i remove with some config on eslint?
[18:10:03.005] ./app/login/page.tsx
[18:10:03.010] 81:23 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities
[18:10:03.010]
[18:10:03.010] ./app/page.tsx
[18:10:03.010] 9:8 Error: 'RetroGrid' is defined but never used. @typescript-eslint/no-unused-vars
[18:10:03.011] 28:9 Error: 'handleLoginLogout' is assigned a value but never used. @typescript-eslint/no-unused-vars
[18:10:03.011] 87:9 Error: 'div7Ref' is assigned a value but never used. @typescript-eslint/no-unused-vars
[18:10:03.011]
[18:10:03.011] ./app/register/page.tsx
[18:10:03.011] 25:19 Error: 'response' is assigned a value but never used. @typescript-eslint/no-unused-vars
[18:10:03.011] 96:35 Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities
[18:10:03.011]
[18:10:03.012] ./components/ui/animated-beam.tsx
[18:10:03.012] 97:16 Error: 'entry' is assigned a value but never used. @typescript-eslint/no-unused-vars
[18:10:03.012] 97:16 Error: 'entry' is never reassigned. Use 'const' instead. prefer-const
[18:10:03.012]
[18:10:03.012] ./components/ui/marquee.tsx
[18:10:03.012] 10:18 Error: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
[18:10:03.013]
[18:10:03.015] info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/app/building-your-application/configuring/eslint#disabling-rules
[18:10:03.051] Error: Command "npm run build" exited with 1
[18:10:03.591]
Avatar
Error: ' can be escaped with ', ‘, ', ’. react/no-unescaped-entities
- you can use
you're free
instead of
you're free
(this is an example)

Error: 'RetroGrid' is defined but never used. @typescript-eslint/no-unused-vars
- you can delete RetroGrid if you are not using it
same with handleLoginLogout, div7Ref and all unused vars

Error: 'entry' is never reassigned. Use 'const' instead. prefer-const
- use const entry, instead of let or var

Error: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
- use correct types instead of any
Answer
Avatar
Hackberry nipple gall parasitoidOP
ok
i resolved
but im developing a frontend with backend using strapi and i have this problem with login google

⨯ useSearchParams() should be wrapped in a suspense boundary at page "/api/auth/callback/google". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
at a (/vercel/path0/.next/server/chunks/804.js:1:4121)
at f (/vercel/path0/.next/server/chunks/804.js:1:17219)
at n (/vercel/path0/.next/server/app/api/auth/callback/google/page.js:1:2975)
at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:45906)
at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:47681)
at nL (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:65480)
at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:63111)
at nO (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:46258)
at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:47727)
at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:62462)
Error occurred prerendering page "/api/auth/callback/google". Read more: https://nextjs.org/docs/messages/prerender-error
Export encountered an error on /api/auth/callback/google/page: /api/auth/callback/google, exiting the build.
⨯ Static worker exited with code: 1 and signal: null
Error: Command "npm run build" exited with 1
Avatar
Hackberry nipple gall parasitoidOP
i resolved it, but i want know why have i still enter if i logged in and i must refresh to have logout button? how can i fix?
Avatar
Asian black bear
Those are all problems no longer related to the original question. Please open a separate thread for this.
Avatar
Hackberry nipple gall parasitoidOP
ok