fix(backend): upgrade @sentry/node to v10 and pin @opentelemetry/resources to fix Node.js v24 crash#971
Merged
brendan-kellam merged 1 commit intomainfrom Mar 1, 2026
Conversation
…urces to fix Node.js v24 crash @sentry/node v9 shipped a nested @opentelemetry/resources@1.30.1 without an exports field, which Node.js v24's legacyMainResolve cannot resolve from ESM context. Upgrading to @sentry/node v10 (matching the web package) removes the nested package. Additionally, the yarn.lock had two conflicting resolutions of @opentelemetry/resources (2.5.0 for ^2.2.0 and 2.5.1 for ^2.5.1). During the Docker multi-stage build this conflict caused Yarn to create a broken partial nested directory under @sentry/node/node_modules with no package.json, triggering the same crash. Pinning @opentelemetry/resources to 2.5.1 via resolutions collapses it to a single entry and eliminates the nesting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
@brendan-kellam your pull request is missing a changelog! |
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughDependency version updates across two package.json files: root-level resolutions for OpenTelemetry resources and rimraf/glob are added or reformatted, while Sentry Node SDK dependencies in the backend package are upgraded from version 9.3.0 to 10.40.0. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@sentry/nodeand@sentry/profiling-nodefrom v9 to v10 (matching the web package upgraded in chore(web): Upgrade to next 16 #970)@opentelemetry/resourcesto2.5.1via rootresolutionsto eliminate a Yarn version-conflict nesting issueRoot Cause
@sentry/nodev9 shipped a nested@opentelemetry/resources@1.30.1(noexportsfield, no rootindex.js) which Node.js v24's ESMlegacyMainResolvecannot resolve, causing an immediate crash on startup.Upgrading to v10 removes that nested package. However, the yarn.lock also had two conflicting resolutions of
@opentelemetry/resources—2.5.0(for^2.2.0from web deps) and2.5.1(for^2.5.1from Sentry v10). During the Docker multi-stage build, Yarn created a broken partial nested directory at@sentry/node/node_modules/@opentelemetry/resources/containing only 7machine-iddetector files and nopackage.json, triggering the same crash.Pinning
@opentelemetry/resourcesto2.5.1in rootresolutionscollapses the yarn.lock to a single entry, eliminating the version conflict and the broken nested directory.Test Plan
docker build -t sourcebot . && docker compose upERR_MODULE_NOT_FOUNDfor@opentelemetry/resources🤖 Generated with Claude Code
Summary by CodeRabbit