next.js
next.js copied to clipboard
Cannot install @next/third-parties in Next.js 15
Link to the code that reproduces this issue
https://github.com/zakuni/reproduction-app
To Reproduce
$ npx create-next-app@latest
$ npm install @next/third-parties@latest next@latest
npm install @next/third-parties@canary next@canary
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"19.0.0-rc-65a56d0e-20241020" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0 || 19.0.0-rc-69d4b800-20241021" from [email protected]
npm error node_modules/next
npm error next@"15.0.1-canary.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/zakuni/.npm/_logs/2024-10-22T05_24_59_242Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/zakuni/.npm/_logs/2024-10-22T05_24_59_242Z-debug-0.log
Same with @next/third-parties@canary and next@canary
Current vs. Expected behavior
@next/third-parties should be successfully installed.
Provide environment information
Node.js v22.8.0
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:38:45 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T8122
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 22.8.0
npm: 10.8.2
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
next: 15.0.0 // Latest available version is detected (15.0.0).
eslint-config-next: 15.0.0
react: 19.0.0-rc-65a56d0e-20241020
react-dom: 19.0.0-rc-65a56d0e-20241020
typescript: 5.6.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I was trying to upgrade to Next.js 15 from my Next.js 14 project and found the issue.
npx @next/codemod@canary upgrade
also fail with dependency conflicts.
I can complete npm install once with npm install --force
, but the next time I run npm install
, I get the same error again