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

Dependency problem after upgrading to nextjs 14 #584

Closed
levipadre opened this issue Oct 27, 2023 · 4 comments
Closed

Dependency problem after upgrading to nextjs 14 #584

levipadre opened this issue Oct 27, 2023 · 4 comments
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@levipadre
Copy link

Description

using next-intl@3.0.0-rc.6:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: next-intl@3.0.0-rc.6
npm ERR! Found: next@14.0.0
npm ERR! node_modules/next
npm ERR!   next@"14.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" from next-intl@3.0.0-rc.6
npm ERR! node_modules/next-intl
npm ERR!   next-intl@"^3.0.0-rc.6" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: next@13.5.6
npm ERR! node_modules/next
npm ERR!   peer next@"^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" from next-intl@3.0.0-rc.6
npm ERR!   node_modules/next-intl
npm ERR!     next-intl@"^3.0.0-rc.6" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

but with next-intl@2.21.0 is the same for me:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for next-intl@^3.0.0-rc.19.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /Users/leventekosa/.npm/_logs/2023-10-27T07_58_57_661Z-debug-0.log
leventekosa@Leventes-iMac-3 ciwf-frontend-application % npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: ciwf-frontend-application@0.1.0
npm ERR! Found: next@14.0.0
npm ERR! node_modules/next
npm ERR!   next@"14.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" from next-intl@2.21.0
npm ERR! node_modules/next-intl
npm ERR!   next-intl@"^2.21.0" from the root project

Any suggestion?

Mandatory reproduction URL (CodeSandbox or GitHub repository)

app directory

Reproduction description

Steps to reproduce:

  1. update to nextjs 14

Expected behaviour

Maybe just needs to adjust next intl to v14.

@levipadre levipadre added bug Something isn't working unconfirmed Needs triage. labels Oct 27, 2023
@aalin
Copy link

aalin commented Oct 27, 2023

As a workaround until next-intl has updated their peerDependencies to include next 14, you can add this to package.json:

"overrides": {
  "next-intl": {
    "next": "^14.0.0"
  }
}

Documentation for overrides

@blefnk
Copy link

blefnk commented Oct 28, 2023

Since I'm using pnpm (docs), this worked for me:

"pnpm": {
  "overrides": {
    "next": "$next"
  }
}

@amannn
Copy link
Owner

amannn commented Nov 2, 2023

Thanks for reporting! Support for Next.js 14 was added in 2.22.1 (stable) and 3.0.0-rc.7 (3.0 release candidate).

@brt-yilmaz
Copy link

As a workaround until next-intl has updated their peerDependencies to include next 14, you can add this to package.json:

"overrides": {
  "next-intl": {
    "next": "^14.0.0"
  }
}

Documentation for overrides

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

5 participants