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

@sentry/nextjs peer dependency fail with canary builds #8976

Closed
mwawrusch opened this issue Sep 6, 2023 · 2 comments
Closed

@sentry/nextjs peer dependency fail with canary builds #8976

mwawrusch opened this issue Sep 6, 2023 · 2 comments

Comments

@mwawrusch
Copy link

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Create a package with

"@sentry/nextjs": "7.64.0",
"next": "13.4.20-canary.11"

Expected Result

It should install sentry.

Actual Result

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@"13.4.20-canary.11" from [email protected]
npm ERR!   apps/roji-io
npm ERR!     [email protected]
npm ERR!     node_modules/roji-io
npm ERR!       workspace apps/roji-io from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^10.0.8 || ^11.0 || ^12.0 || ^13.0" from @sentry/[email protected]
npm ERR! node_modules/@sentry/nextjs
npm ERR!   @sentry/nextjs@"7.64.0" from [email protected]
npm ERR!   apps/roji-io
npm ERR!     [email protected]
npm ERR!     node_modules/roji-io
npm ERR!       workspace apps/roji-io 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! 

Basically, include canary builds in the sentry peer dependency. There are ways to circumvent this but they tend to fail occasionally (especially in monorepos), resulting in multiple hours of lost productivity.

Product Area

Unknown

Link

No response

DSN

No response

Version

No response

@getsantry
Copy link

getsantry bot commented Sep 6, 2023

Assigning to @getsentry/support for routing ⏲️

@Kobby-Bawuah Kobby-Bawuah transferred this issue from getsentry/sentry Sep 7, 2023
@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 Sep 7, 2023
@AbhiPrasad
Copy link
Member

Hey @mwawrusch. Please see #7125 (comment) on why this happens.

Hi, unfortunately, this is a weird behavior of npm we can't really fix on our end without getting rid of the peerDependency. We defined the peer dependency with ^13 which is accurate but npm apparently doesn't resolve this to prereleases as outlined npm/cli#4958 (comment).

Since there is nothing we can do to fix it on our end, closing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants