#error: ENOENT while resolving package '@opentelemetry/exporter-trace-otlp-proto'

1 messages · Page 1 of 1 (latest)

brisk sluice
#

hi! I recently started getting a weird error in CI when using the @dagger.io/dagger npm package with bun as runtime:

error: ENOENT while resolving package '@opentelemetry/exporter-trace-otlp-proto' from '/home/runner/.bun/install/cache/@dagger.io/dagger@0.19.9@@@1/dist/src/telemetry/init.js'

I see this file was recently changed to import from additional dependencies, but these new dependencies are not in package.json:
https://github.com/dagger/dagger/pull/11486/changes#diff-069d84ca5ec63b3d27ed88bd17d32741186f17ea6084290c58ea3980ac3debc8R2

Am I missing something, or should these new dependencies be added to package.json of @dagger.io/dagger?

Deps:

  • @opentelemetry/sdk-trace-base
  • @opentelemetry/exporter-trace-otlp-proto
GitHub

Use LiveSpanProcessor if live trace is enabled in ts sdk telemetry.

brisk sluice
#

ok I finally fixed it by adding these to my package.json dependencies:

"@opentelemetry/context-async-hooks": "^2.3.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.209.0",
cinder yoke
#

@native hearth 👆

native hearth
#

Oh thanks for reporting!

I’ll spend some time next week to refactor the way we build the TS SDK + add some tests so this will not happen anymore!

brisk sluice
#

Sweet, thanks! HItting this again so looking forward to fixes 🙂
edit: fixed again by running this in CI before running dagger:

bun add @opentelemetry/exporter-trace-otlp-proto
native hearth
#

I also plan to split @dagger.io/core from @dagger.io/daggger so @dagger.io/dagger would only contain the generated client and utilities for modules 😄