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

ver: 7.54.0 Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations. #8326

Closed
3 tasks done
sysmat opened this issue Jun 14, 2023 · 21 comments · Fixed by #8329 or #8334
Closed
3 tasks done
Assignees

Comments

@sysmat
Copy link

sysmat commented Jun 14, 2023

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/angular

SDK Version

7.55.0

Framework Version

angular 16.1.0

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. ng build

Expected Result

  • build app
  • it work with "@sentry/angular": "^7.54.0",

Actual Result

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

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

  • peerDependencies are missing for "@sentry-internal/rrweb": "^1.108.0", "@sentry-internal/rrweb-snapshot": "^1.108.0",

@kle-pra
Copy link

kle-pra commented Jun 14, 2023

Same error with the newest "@sentry/angular": "7.55.0".

It works OK with"@sentry/angular": "7.53.0",

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

  • sentry/replay is problem
"name": "@sentry/replay",
  "version": "7.55.0",
  "devDependencies": {
    "@babel/core": "^7.17.5",
    "@sentry-internal/replay-worker": "7.55.0",
    "@sentry-internal/rrweb": "1.108.0",
    "@sentry-internal/rrweb-snapshot": "1.108.0",
    "jsdom-worker": "^0.2.1",
    "tslib": "^1.9.3"
  },

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

  • even if I change to "@sentry/angular-ivy": "^7.55.0" error still persist
node_modules/@sentry/replay/types/index.d.ts:3:27 - error TS2307: Cannot find module '@sentry-internal/rrweb' or its corresponding type declarations.

@mydea
Copy link
Member

mydea commented Jun 14, 2023

Hi,

thanks for reporting this. This is a bug we accidentally introduced, we thought the types would be inlined but they aren't. I am reverting this here #8329 and will cut a patch release ASAP.

mydea added a commit that referenced this issue Jun 14, 2023
This breaks, as we do not have these packages as dependencies but
devDependencies, but the types are not inlined...

This was introduced here:
#8284

Fixes #8326
@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

@mydea what is solution?

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

for now only works with "@sentry/angular-ivy": "7.53.0",

@mydea
Copy link
Member

mydea commented Jun 14, 2023

Hi, we just releases v7.55.1, which hopefully fixes this - can you give it a try?

@isetpro
Copy link

isetpro commented Jun 14, 2023

@mydea I've just tried - doesn't work - the same issue.

@ca-vladyslavhaidar
Copy link

@mydea before release I saw much more errors, now only two errors left:

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

As mentioned above, there is still error present.

@rodolfoBee rodolfoBee reopened this Jun 14, 2023
@mydea
Copy link
Member

mydea commented Jun 14, 2023

Damn, it seems I missed something - sorry about this! Will stamp out the remaining issues and cut another fix.

@mydea
Copy link
Member

mydea commented Jun 14, 2023

I have a fix here, sadly I wasn't able to reproduce the issue in my test apps, so can't verify the fix actually finally fully resolves this 😬 #8334 But I hope/think it should fix it!

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

  • Test app is using angular 16.1?
  • is test app importing sentry from npm?

@affjunior
Copy link

we are having the same problem here in the company, waiting for the new release

@mydea mydea reopened this Jun 14, 2023
@mydea
Copy link
Member

mydea commented Jun 14, 2023

  • Test app is using angular 16.1?
  • is test app importing sentry from npm?

My test app is using latest from NPM, but it is very basic so I am not necessarily surprised it does not capture this. It's weird because we also have E2E tests in this repo checking the types, which I would have expected to catch this as well. Not sure why it isn't...

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

In test app module, configure sentry and tracing and then run ng build

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

@mydea
Copy link
Member

mydea commented Jun 14, 2023

OK, we just released 7.55.2, I tried it in your repro (thanks a lot!!) and it seems to have fixed the problem 🙏

@sysmat
Copy link
Author

sysmat commented Jun 14, 2023

  • with "@sentry/angular-ivy": "^7.55.2", ng build works

@ca-vladyslavhaidar
Copy link

ca-vladyslavhaidar commented Jun 14, 2023

for me it also works (we use 7.54.0)
@mydea much respect for quick fix and updates - thanks a lot!

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