GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Opentelemetry api npm peer dep broken with strict pnpm · Issue #13219 · getsentry/sentry-javascript

Opentelemetry api npm peer dep broken with strict pnpm #13219

New issue
Copy link
New issue
Copy link
Closed
#13640
Closed
Opentelemetry api npm peer dep broken with strict pnpm#13219
#13640
Copy link
Labels
Bug

Description

@vchernin
vchernin
opened on Aug 3, 2024
Issue body actions

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.

Activity

  1. vchernin
    added
    Type: Bug
    on Aug 3, 2024
  2. getsantry
    added
    Waiting for: Product Owner
    on Aug 3, 2024
  3. getsantry
    added this to GitHub Issues with 👀 3on Aug 3, 2024
  4. getsantry
    moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 3, 2024
  5. github-actions
    added
    Package: node
    on Aug 3, 2024
  6. mydea commented on Aug 5, 2024

    @mydea
    mydea
    on Aug 5, 2024
    Member
    More actions

    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?

  7. getsantry
    removed
    Waiting for: Product Owner
    on Aug 5, 2024
  8. getsantry
    moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 5, 2024
  9. vchernin commented on Aug 6, 2024

    @vchernin
    vchernin
    on Aug 6, 2024
    Author
    More actions

    I could not consistently reproduce following my instructions as I had expected. The only workaround I could find was to delete the pnpm-lock.yaml file and reinstall all the dependencies. (I also happend to purge the node_modules directories and pnpm store just in case).

    In any case this is a bug in pnpm and not sentry.

  10. vchernin
    closed this as completedon Aug 6, 2024
  11. lenovouser commented on Sep 9, 2024

    @lenovouser
    lenovouser
    on Sep 9, 2024
    More actions

    I am also experiencing this. With version 8.29.0.

    Reacted by Karl Schwaier and Vincent Chernin
  12. vchernin commented on Sep 9, 2024

    @vchernin
    vchernin
    on Sep 9, 2024
    Author
    More actions

    I am also seeing this with version 8.29.0. This time deleting pnpm-lock.yaml and purging node_modules and the pnpm store does not workaround this. The dependency chain is also a bit simpler.

    my-local-package
    └─┬ @sentry/node 8.29.0
      └─┬ @sentry/opentelemetry 8.29.0
        └── ✕ unmet peer @opentelemetry/instrumentation@^0.52.1: found 0.53.0
    

    This seems like a problem here since @sentry/node provides 0.53.0 while @sentry/opentelemetry depends on 0.52.1 of @opentelelemtry/instrumentation.

    sentry-javascript/packages/node/package.json

    Line 71 in 49d95ca

    "@opentelemetry/instrumentation": "^0.53.0",

    sentry-javascript/packages/opentelemetry/package.json

    Line 49 in 49d95ca

    "@opentelemetry/instrumentation": "^0.52.1",

    The peer dep is specified allowing semver minor ranges, except since this is a 0.x.x version any minor change could be a breaking change according to semver, so pnpm is correct to complain here so I am reopening.

  13. vchernin
    reopened this on Sep 9, 2024
  14. getsantry
    added
    Waiting for: Product Owner
    on Sep 9, 2024
  15. getsantry
    moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Sep 9, 2024
  16. billyjanitsch commented on Sep 10, 2024

    @billyjanitsch
    billyjanitsch
    on Sep 10, 2024
    More actions

    Seems like an oversight in #13587.

  17. andreiborza commented on Sep 10, 2024

    @andreiborza
    andreiborza
    on Sep 10, 2024
    Member
    More actions

    Sorry about that, we'll get this resolved as quickly as we can. I opened a PR for it #13640

  18. getsantry
    removed
    Waiting for: Product Owner
    on Sep 10, 2024
  19. getsantry
    moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Sep 10, 2024
  20. andreiborza
    closed this as completedin #13640on Sep 10, 2024
  21. andreiborza
    added a commit that references this issue on Sep 10, 2024

    fix(node): Update OpenTelemetry instrumentation package for solidstar…

    This issue will close once commit 0d79b51 is merged into the 'develop' branch.
    0d79b51
  22. AbhiPrasad commented on Sep 10, 2024

    @AbhiPrasad
    AbhiPrasad
    on Sep 10, 2024
    Contributor
    More actions

    Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.30.0 - thanks for your patience

    Reacted by Vincent Chernin
  23. lenovouser commented on Nov 5, 2024

    @lenovouser
    lenovouser
    on Nov 5, 2024
    More actions

    I am also experiencing this. With version 8.29.0.

    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.

  24. andreiborza commented on Nov 5, 2024

    @andreiborza
    andreiborza
    on Nov 5, 2024
    Member
    More actions

    @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.

  25. andreiborza commented on Nov 5, 2024

    @andreiborza
    andreiborza
    on Nov 5, 2024
    Member
    More actions

    The fix has been released with 8.37.1, please upgrade. Sorry for the inconvenience again.

  26. stephanie-anderson
    removed
    Type: Bug
    on Mar 20, 2025
  27. ghost added
    Bug
    on Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug

    Projects

    • GitHub Issues with 👀 3
      Status
      No status
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.