Skip to content

TS2451: Cannot redeclare block-scoped variable #249

@matthew2564

Description

@matthew2564

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/angular

SDK Version

7.16.0

Framework Version

Angular 13.3.11 & Ionic 6.3.2

Link to Sentry event

No response

Steps to Reproduce

Node.js v16.10.x

Typescript 4.5.x

Currently we are using the following versions of Sentry package:
"@sentry/angular": "^6.19.7",
"@sentry/capacitor": "^0.6.1",
"@sentry/tracing": "^6.19.7"

After trying to bump all packages to latest i.e.:
"@sentry/angular": "^7.16.0",
"@sentry/capacitor": "^0.10.1",
"@sentry/tracing": "^7.16.0"

Expected Result

No error

Actual Result

I receive the following error:

Error: node_modules/@sentry/types/types/globals.d.ts:2:11 - error TS2451: Cannot redeclare block-scoped variable '__DEBUG_BUILD__'.

2     const __DEBUG_BUILD__: boolean;
            ~~~~~~~~~~~~~~~

  node_modules/@sentry/tracing/node_modules/@sentry/types/types/globals.d.ts:2:11
    2     const __DEBUG_BUILD__: boolean;
                ~~~~~~~~~~~~~~~
    '__DEBUG_BUILD__' was also declared here.

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions