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

Resolve TypeScript Configuration Conflicts Causing False Errors #427

Open
coderabbitai bot opened this issue Dec 14, 2024 · 0 comments
Open

Resolve TypeScript Configuration Conflicts Causing False Errors #427

coderabbitai bot opened this issue Dec 14, 2024 · 0 comments
Assignees

Comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2024

Description

We are encountering build-blocking TypeScript errors after updating to the latest versions of React, TypeScript, and Next.js. Temporary @ts-ignore flags have been added to suppress these errors, but this is not a sustainable solution as it masks underlying issues with the TypeScript configuration.

Affected Areas:

  • Files where @ts-ignore is used, such as:
    • packages/ui/components/base/tooltip.tsx
    • packages/ui/components/base/dialog.tsx
    • apps/web/components/ui/tooltip.tsx
    • apps/web/components/ui/dialog.tsx
    • Other components interacting with React.ElementRef and React.ComponentPropsWithoutRef.

Possible Causes:

  • Inconsistent tsconfig.json settings across packages, especially with compilerOptions.
  • Conflicting moduleResolution settings ("node", "bundler", "NodeNext") leading to type conflicts.
  • Outdated or mismatched versions of @types/react, typescript, and react.

Action Items

  • Audit TypeScript Configurations:

    • Align tsconfig.json files across the project to use consistent compilerOptions.
    • Ensure that moduleResolution is set appropriately for the project's needs.
  • Update Dependencies:

    • Verify and update the versions of typescript, react, next, and their corresponding type definitions.
    • Make sure that all packages reference compatible versions.
  • Remove @ts-ignore Flags:

    • After resolving configuration issues, remove the @ts-ignore comments to enforce proper type checking.
  • Testing:

    • Perform a full build and run the test suite to confirm that the issues have been resolved.

References

Assignee

@AndlerRL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant