-
Notifications
You must be signed in to change notification settings - Fork 137
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
Cannot find module 'rrweb-snapshot' or its corresponding type declarations #252
Comments
Does this still happen on the latest version? |
Yes, it does for version |
👋 We are encountering the same issue while validating type definitions using We would prefer not to force our users to install those dependencies which we are not using just to get |
This is neccessary to resolve re-exported types referred to by posthog-js' type definitions. This isn't ideal, but * We intend to start using sentry anyway * Discussion with posthog maintainers about rrweb-snapshot at PostHog/posthog-js#252, perhaps we can find another solution soon
Hey! We released |
Hi @Twixes, the issue is still there for me. I created a small repo to reproduce it for your convenience. So far the only solution that works for me is to install |
We have the same problem. Adding the dependencies as dev only dependencies won't help, npm doesn't install the devDependencies of a project's transitive dependencies. |
@loremaps A reproducible example is fantastic, thank you! @novocaine You are of course correct, |
I've just added posthog to my Angular 18 project and I'm having this exact issue. What can I do to resolve it? |
Can you try adding |
I encountered this problem when updating Angular 17 to 18.2.8. "skipLibCheck": true to your tsconfig.json - worked also npm install --save-dev @rrweb/types rrweb-snapshot - worked Are these the appropriate solutions or stopgaps? |
I haven't tried "skipLibCheck" since I really don't want to have it on anyway. I'm sticking to the older version of posthog for now. |
reopening this to have somewhere to link people to |
we have rrweb-io/rrweb#1593 open with rrweb... we'd like to fix the root cause here and be able to import the types and not the packages so that our dependencies are clear |
Looks like it has been merged and released on rrweb side. |
Hi,
I get the following error when trying to upgrade to a later version than
v1.9.7
this is for an Angular 12 project
It looks related to this:
posthog-js/src/module.d.ts
Line 4 in 923e82d
Should rrweb-snapshot be added to the dependencies?
FYI it works fine if I install
rrweb-snapshot
separately.The text was updated successfully, but these errors were encountered: