Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@sentry/replay breaks typescript build: Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations. #8327

Closed
3 tasks done
annervisser opened this issue Jun 14, 2023 · 3 comments

Comments

@annervisser
Copy link

annervisser commented Jun 14, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/angular-ivy

Note: This option isn't available in the dropdown in the issue template

SDK Version

7.55.0

Framework Version

7.55.0

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. Create a new angular project: ng new --no-interactive sentry-type-error && cd sentry-type-error
  2. Install sentry: npm install @sentry/angular-ivy
  3. Import Sentry in main.ts:
    • Automatically: sed -i "1iimport * as Sentry from '@sentry/angular-ivy';" src/main.ts
    • Or manually add this to main.ts: import * as Sentry from '@sentry/angular-ivy';
  4. Build the application: ng build

Expected Result

The application builds, and sentry is available to initialize

Actual Result

The application doesn't build because of typescript errors:

$ ng build
✔ Browser application bundle generation complete.

Error: node_modules/@sentry/replay/types/index.d.ts:3:27 - error TS2307: Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations.

3 export { EventType } from '@sentry-internal/rrweb';
                            ~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@sentry/replay/types/index.d.ts:4:26 - error TS2307: Cannot find module '@sentry-internal/rrweb-snapshot' or its corresponding type declarations.

4 export { NodeType } from '@sentry-internal/rrweb-snapshot';
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@sentry/replay/types/index.d.ts:5:55 - error TS2307: Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations.

5 export type { eventWithTime, fullSnapshotEvent } from '@sentry-internal/rrweb';
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@sentry/replay/types/index.d.ts:6:43 - error TS2307: Cannot find module '@sentry-internal/rrweb-snapshot' or its corresponding type declarations.

6 export type { serializedNodeWithId } from '@sentry-internal/rrweb-snapshot';
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@sentry/replay/types/types/replayFrame.d.ts:1:32 - error TS2307: Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations.

1 import type { EventType } from '@sentry-internal/rrweb';
                                 ~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@sentry/replay/types/types/rrweb.d.ts:1:32 - error TS2307: Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations.

1 import type { EventType } from '@sentry-internal/rrweb';
                                 ~~~~~~~~~~~~~~~~~~~~~~~~
@kle-pra
Copy link

kle-pra commented Jun 14, 2023

Same problem, issue is opened already.

Duplicate of #8326

@sysmat
Copy link

sysmat commented Jun 14, 2023

The same

@annervisser
Copy link
Author

Duplicate of #8326

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

No branches or pull requests

4 participants