Repository navigation
Pin the OTLP trace exporter so npm installs a working tree - #291
Merged
Merged
Conversation
`npm install explorbot` (and npx) crashed on start:
SyntaxError: Named export 'SeverityNumber' not found.
The requested module '@opentelemetry/api' is a CommonJS module
@langfuse/otel takes @opentelemetry/exporter-trace-otlp-http as a peer
(">=0.202.0 <1.0.0"). Explorbot did not list it, so npm installed the
newest match, 0.300.0, which needs @opentelemetry/api >=1.10. The
OpenTelemetry SDK explorbot uses (0.208 / 2.x) needs api <1.10, so npm
kept 1.9.1 and the exporter failed to load. bun.lock pinned 0.208.0,
which is why the repo itself worked.
List the exporter at ^0.208.0, the line the rest of the SDK is on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
A fresh
npm install -g explorbot@0.6.0(andnpx explorbot) crashes on start:@langfuse/oteldeclares@opentelemetry/exporter-trace-otlp-httpas a peer (>=0.202.0 <1.0.0). Explorbot doesn't list it, so npm auto-installs the newest match: 0.300.0 (released 2026-10-20), which needs@opentelemetry/api >=1.10.0 <1.11.0. The SDK explorbot is on (sdk-node0.208,sdk-trace-base2.x) needsapi <1.10.0. npm keeps 1.9.1, warnsERESOLVE overriding peer dependency, and the exporter fails at import.The repo works because
bun.lockpins the exporter at 0.208.0, but npm never readsbun.lock. Older releases probably break the same way on a fresh install; installs cached before Oct 20 still work.Fix
Add
"@opentelemetry/exporter-trace-otlp-http": "^0.208.0"as a direct dependency, so the peer resolves to the line the rest of the SDK is on.bun.lockis regenerated. Besides the new entry, bun drops the nested 0.205 exporter copies it no longer needs, and addswrap-ansi, whichmain'spackage.jsonalready listed but the lockfile was missing.Verification
Took the published
explorbot@0.6.0tarball, added only this dependency, and installed it withnpm install --global:ERESOLVEwarnings@opentelemetry/apipeersexplorbot --version0.6.0bun test tests/unit: 1746 pass, 1 fail. The failure isenables Langfuse from LANGFUSE_* env vars, which fails onmaintoo.Moving the whole OpenTelemetry stack to the 0.300 / api 1.10 line is the longer-term fix. This PR is the smallest change that makes a publishable release.
🤖 Generated with Claude Code