Skip to content

npm install issue with peer dependencies for next 12 in @sentry/nextjs #4105

@MKrupauskas

Description

@MKrupauskas

Package + Version

  • @sentry/nextjs ^6.13.3
  • next 12.0.1

Version:

node -v                             
v14.16.1

npm -v       
7.18.1

Description

npm i with the new version of next (^12.0) is failing because of @sentry/nextjs because the defined valid peer dependencies for next do not include version 12, see full error below. To mitigate this I've created a PR to add next 12 to the valid peer deps list. This change will need a package version release. Note: the install works with npm i --legacy-peer-deps which ignores peer deps.

npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/next
npm ERR!   next@"12.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^10.0.8 || ^11.0" from @sentry/[email protected]
npm ERR! node_modules/@sentry/nextjs
npm ERR!   @sentry/nextjs@"^6.13.3" 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.
npm ERR! 
npm ERR! See /home/x/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/x/.npm/_logs/2021-10-30T16_46_37_402Z-debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions