Error "Named export 'BasicTracerProvider' not found" when running ceramic daemon

Hi, i got this error when run ceramic daemon, i use Node.js v20.4.0 and v18, got same error.

npm -v  @ceramicnetwork/cli
9.7.2

 ~ ceramic daemon
file:///Users/rifqialfian/.nvm/versions/node/v20.4.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ceramicnetwork/observability/dist/service-metrics.js:19
import { BasicTracerProvider, TraceIdRatioBasedSampler, ParentBasedSampler, BatchSpanProcessor } from '@opentelemetry/sdk-trace-base';
         ^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'BasicTracerProvider' not found. The requested module '@opentelemetry/sdk-trace-base' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@opentelemetry/sdk-trace-base';
const { BasicTracerProvider, TraceIdRatioBasedSampler, ParentBasedSampler, BatchSpanProcessor } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:188:5)
    at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
    at async file:///Users/rifqialfian/.nvm/versions/node/v20.4.0/lib/node_modules/@ceramicnetwork/cli/bin/ceramic.js:3:1

Node.js v20.4.0

Hi,

Sorry you’re running into this error.

We have a dependency issue with some of the OpenTelemetry modules that are causing this error.

It should be updated soon! In the mean time, a tagged release or Docker containers should work.

Please be aware, we’re still working with nodejs v16

1 Like

Hey I believe this should be fixed in the develop branch of js-ceramic if you want to use that now GitHub - ceramicnetwork/js-ceramic: Typescript implementation of the Ceramic protocol

1 Like