Skip to content

unable to compile "Cannot find name 'Element'" #5673

Description

@FrederikPriede

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/node

SDK Version

7.12.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

  • create empty folder
  • switch to newly created folder
  • npm init (use defaults)
  • npm i @sentry/node @types/node typescript
  • npx tsc --init (create vanilla tsconfig)
  • change lib property within tsconfig.json to ES2020
  • change skipLibCheck to false
  • create simple source file test.ts
import{captureException}from"@sentry/node";captureException(newError());
  • run npx tsc

Expected Result

test.ts should compile to test.js

Actual Result

Compiling fails with this error:

node_modules/@sentry/utils/types/browser.d.ts:22:58 - error TS2304: Cannot find name 'Element'.
22 exportdeclarefunctiongetDomElement(selector: string): Element | null;
~~~~~~~
Found 1 error in node_modules/@sentry/utils/types/browser.d.ts:22

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions