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 install @sitecore-jss/sitecore-jss-nextjs with NextJS 15 without --legacy-peer-deps due to peer dependency on NextJS 14 #2030

Open
jkesseler opened this issue Feb 4, 2025 · 1 comment
Labels
backlog Issue/PR/discussion is reviewed and added to backlog for the further work 🐞 bug

Comments

@jkesseler
Copy link

Describe the Bug

  • JSS Version: 22.4.1
  • NextJS Version: 15.1.6

See packages/sitecore-jss-nextjs/package.json#L71

❯ npm i -S @sitecore-jss/sitecore-jss-nextjs@latest
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/next
npm error   next@"15.1.6" from the root project
npm error
npm error Could not resolve dependency:
npm error peer next@"^14.2.18" from @sitecore-jss/[email protected]
npm error node_modules/@sitecore-jss/sitecore-jss-nextjs
npm error   @sitecore-jss/sitecore-jss-nextjs@"22.4.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.

When using --force or --legacy-peer-deps installation works of course

To Reproduce

Run npm i -S @sitecore-jss/sitecore-jss-nextjs inside a NextJS 15 project

Expected Behavior

Runiing npm i -S @sitecore-jss/sitecore-jss-nextjs works without having to use the --force or --legacy-peer-deps flags

Possible Fix

No response

Provide environment information

  • Sitecore Version:
  • JSS Version:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project (if available):
@yavorsk
Copy link
Contributor

yavorsk commented Feb 6, 2025

Hi @jkesseler , latest jss-nextjs SDK is not yet compatible with Next 15. We have the ticket for upgrading to next 15 in our pipeline and we'll start working on it soon (although I can't provide specific timeline).

@yavorsk yavorsk added the backlog Issue/PR/discussion is reviewed and added to backlog for the further work label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issue/PR/discussion is reviewed and added to backlog for the further work 🐞 bug
Projects
None yet
Development

No branches or pull requests

2 participants