rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

[Bug]: Typescript errors when building with rrweb

Open cnguyen0 opened this issue 1 year ago • 2 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

v2.0.0-alpha.14

Expected Behavior

I should be able to build my local package with no typescript errors from any rrweb dependencies

Actual Behavior

Since upgrading from [email protected] -> [email protected], I've been getting typescript errors every time I build my application (see screenshots below).

It's coming from dev dependencies rrdom. Looking at the version's release of rrdom, I'm not seeing any new changes that might have caused it. I'm thinking it could be a package version incompatibility? Both the application and rrweb are using "typescript": "^5.4.5",.

My TS config is set up like this. I'm wondering if there's any in the config that is causing the build issue.

{
  "compilerOptions": {
    "allowJs": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": false,
    "forceConsistentCasingInFileNames": true,
    "isolatedModules": true,
    "jsx": "react-jsx",
    "jsxImportSource": "preact",
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "noEmit": true,
    "paths": {
      "react": ["./node_modules/preact/compat/"],
      "react-dom": ["./node_modules/preact/compat/"]
    },
    "resolveJsonModule": true,
    "skipLibCheck": false,
    "strict": true,
    "target": "ESNext",
    "useDefineForClassFields": true
  },
}

Any ideas here on resolving my build issue? Much appreciated.

Screenshot 2024-08-26 at 5 02 33 PM

Steps to Reproduce

  1. Set rrweb version to [email protected]
  2. npm i
  3. Build own application

Testcase Gist URL

No response

Additional Information

No response

cnguyen0 avatar Aug 27 '24 00:08 cnguyen0