rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

[Bug]: Cannot find module 'rrweb/src/types' or its corresponding type declarations.

Open dovvan opened this issue 3 years ago • 3 comments

Preflight Checklist

  • [X] I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.1

Expected Behavior

Project should build

Actual Behavior

Error: node_modules/rrdom/es/diff.d.ts:2:85 - error TS2307: Cannot find module 'rrweb/src/types' or its corresponding type declarations.

2 import type { canvasMutationData, canvasEventWithTime, inputData, scrollData } from 'rrweb/src/types';

Error: node_modules/rrdom/es/index.d.ts:3:85 - error TS2307: Cannot find module 'rrweb/src/types' or its corresponding type declarations.

3 import type { canvasMutationData, canvasEventWithTime, inputData, scrollData } from 'rrweb/src/types';

Error: node_modules/rrweb/typings/types.d.ts:395:19 - error TS2304: Cannot find name 'FontFaceDescriptors'.

395 descriptors?: FontFaceDescriptors;

Error: node_modules/rrweb/typings/types.d.ts:520:26 - error TS2304: Cannot find name 'FontFace'.

520 FontFace: typeof FontFace;

Steps to Reproduce

Install sentry rrweb with npm install --save @sentry/rrweb rrweb Register the integration in Sentry.init import SentryRRWeb from "@sentry/rrweb"; integrations: [ new SentryRRWeb(), Try to build the project.

Testcase Gist URL

No response

Additional Information

No response

dovvan avatar Aug 22 '22 14:08 dovvan

Have you tried v1.x?

Yuyz0112 avatar Aug 22 '22 15:08 Yuyz0112

Have you tried v1.x?

Hi! Yes, I have tried it with the same result

dovvan avatar Aug 22 '22 16:08 dovvan

Finally got it to work after a lot of testing different versions. 0.9.14 seems to work....

dovvan avatar Aug 24 '22 14:08 dovvan

+1 having same issue. Most recent release build and 0.9.14 both didn't work for me (1.1.3 for typing issues, 0.9.14 as I'm building a jupyter widget so NodeJS.inspectoptions was erroring).

For anyone else, using [email protected] worked for me though!

dwootton avatar Nov 14 '22 14:11 dwootton