Skip to content

TypeError: Class extends value undefined is not a constructor or null (HttpInstrumentation) #16575

Description

@Shudrum

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

^9.3.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

package.json

{
  "name": "sentry-issue",
  "type": "module",
  "scripts": {
    "start": "tsx index.ts"
  },
  "dependencies": {
    "@sentry/node": "9.3.0",
    "tsx": "^4.20.2"
  }
}

index.ts

import * as Sentry from '@sentry/node';

console.log(Sentry);

Steps to Reproduce

The issue can be reproduced from the 9.3 version. It works properly on the 9.2 one.

  1. Just use the provided package.json
  2. npm i
  3. npm start
  4. Boom

I really tried to find this issue without success. Really sorry if it is a duplicate.
This one seems so obvious I really think you already have it.

Expected Result

Just the log of the Sentry instance.

Actual Result

export class HttpInstrumentation extends InstrumentationBase<HttpInstrumentationConfig> {
  ^

TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (/Users/shudrum/sentry-issue/node_modules/@opentelemetry/instrumentation-http/src/http.ts:97:42)
at loadCJSModule (node:internal/modules/esm/translators:161:3)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7)
at ModuleJob.runSync (node:internal/modules/esm/module_job:258:17)
at require (node:internal/modules/esm/translators:146:9)
at Object.<anonymous> (/Users/shudrum/sentry-issue/node_modules/@opentelemetry/instrumentation-http/src/index.ts:17:1)
at loadCJSModule (node:internal/modules/esm/translators:161:3)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7)
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions