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

[Bug]: Typescript errors when building with rrweb #1559

Open
1 task done
cnguyen0 opened this issue Aug 27, 2024 · 2 comments
Open
1 task done

[Bug]: Typescript errors when building with rrweb #1559

cnguyen0 opened this issue Aug 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cnguyen0
Copy link

cnguyen0 commented Aug 27, 2024

Preflight Checklist

  • 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 cnguyen0 added the bug Something isn't working label Aug 27, 2024
@rodrigopavan
Copy link

Same here. Is someone looking at this?

@fadi-george
Copy link

fadi-george commented Oct 11, 2024

I believe this would happen if skipLibCheck is true so might be a typo in your description.
Would have to set skipLibCheck to false but ideally the typings would get fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@fadi-george @rodrigopavan @cnguyen0 and others