Repository navigation
Closed
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/node
SDK Version
8.22.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
.npmrc (despite this originally being for npm, pnpm stores its own config options in this file):
strict-peer-dependencies=true
package.json:
{
"name": "my-local-package",
"dependencies": {
"@sentry/node": "8.22.0"
}
}pnpm install
Tested with pnpm 9.6.0.
Expected Result
Correct peer deps versions and successful installation with the strict-peer-dependencies setting enabled.
Perhaps the @opentelemetry/api version from @sentry/node should be downgraded, or maybe the @opentelemetry/instrumentation-mongodb can be upgraded.
The pnpm setting strict-peer-dependencies is not enabled by default and I could set it to false. But it seems like a bug to have potential version mismatch.
Actual Result
Result:
Scope: all 12 workspace projects
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 117, reused 0, downloaded 0, added 0
Progress: resolved 472, reused 0, downloaded 0, added 0
Progress: resolved 869, reused 0, downloaded 0, added 0
Progress: resolved 1104, reused 0, downloaded 0, added 0
Progress: resolved 1124, reused 0, downloaded 0, added 0, done
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
my-local-package
└─┬ @sentry/node 8.22.0
└─┬ @opentelemetry/instrumentation-mongodb 0.46.0
└─┬ @opentelemetry/sdk-metrics 1.24.1
├── ✕ unmet peer @opentelemetry/api@">=1.3.0 <1.9.0": found 1.9.0 in @sentry/node
├─┬ @opentelemetry/core 1.24.1
│ └── ✕ unmet peer @opentelemetry/api@">=1.0.0 <1.9.0": found 1.9.0 in @sentry/node
└─┬ @opentelemetry/resources 1.24.1
└── ✕ unmet peer @opentelemetry/api@">=1.0.0 <1.9.0": found 1.9.0 in @sentry/node
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Activity
mydea commentedon Aug 5, 2024
Hey, this is weird, because the mongodb instrumentation has this depednency:
"@opentelemetry/sdk-metrics" "^1.9.1", which should resolve to the latest current version (1.25.1)of@opentelemetry/sdk-metrics`, which in turn allows 1.9.0 of the API package. Why is it pulling in 1.24.1 of sdk-metrics? Can you try clearing your cache?vchernin commentedon Aug 6, 2024
I could not consistently reproduce following my instructions as I had expected. The only workaround I could find was to delete the
pnpm-lock.yamlfile and reinstall all the dependencies. (I also happend to purge thenode_modulesdirectories and pnpm store just in case).In any case this is a bug in pnpm and not sentry.
lenovouser commentedon Sep 9, 2024
I am also experiencing this. With version
8.29.0.vchernin commentedon Sep 9, 2024
I am also seeing this with version
8.29.0. This time deletingpnpm-lock.yamland purgingnode_modulesand the pnpm store does not workaround this. The dependency chain is also a bit simpler.This seems like a problem here since
@sentry/nodeprovides0.53.0while@sentry/opentelemetrydepends on0.52.1of@opentelelemtry/instrumentation.sentry-javascript/packages/node/package.json
Line 71 in 49d95ca
sentry-javascript/packages/opentelemetry/package.json
Line 49 in 49d95ca
The peer dep is specified allowing semver minor ranges, except since this is a
0.x.xversion any minor change could be a breaking change according to semver, so pnpm is correct to complain here so I am reopening.billyjanitsch commentedon Sep 10, 2024
Seems like an oversight in #13587.
andreiborza commentedon Sep 10, 2024
Sorry about that, we'll get this resolved as quickly as we can. I opened a PR for it #13640
fix(node): Update OpenTelemetry instrumentation package for solidstar…
AbhiPrasad commentedon Sep 10, 2024
Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.30.0 - thanks for your patience
lenovouser commentedon Nov 5, 2024
This has happened again with version
8.37.0(current release, not fixed). Is there a way where a test or something can be added in order to not create releases with this issue again? We can't even prevent this on our side unless we go for pinning minor versions, which we ideally do not want.andreiborza commentedon Nov 5, 2024
@lenovouser sorry about that. We used Dependabot and bumped deps here #14174 but alas it didn't catch everything.
I pushed a fix for this and we'll release a patch.
We're thinking of a way to catch these in e2e tests.
andreiborza commentedon Nov 5, 2024
The fix has been released with
8.37.1, please upgrade. Sorry for the inconvenience again.