Skip to content

fix(deps): Fix TS2786 ResizableBox JSX element type error#86

Merged
ar1603 merged 3 commits into
developmentfrom
amitraikwar/fix-react-types-ci
Apr 20, 2026
Merged

fix(deps): Fix TS2786 ResizableBox JSX element type error#86
ar1603 merged 3 commits into
developmentfrom
amitraikwar/fix-react-types-ci

Conversation

@ar1603

@ar1603 ar1603 commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Force @types/react and @types/react-dom to ^18.3.1 via resolutions to fix conflicting type definitions causing missing 'refs' property errors on older class components like ResizableBox. Also update package name, description, and repository URL.

@ar1603 ar1603 self-assigned this Apr 19, 2026
ar1603 added 2 commits April 20, 2026 04:24
Issue:
- The CI pipeline fails with TS2786: 'ResizableBox' cannot be used as a JSX component.
- The 'refs' property is missing in the type definitions for older class components (like ResizableBox) due to conflicting or mismatched React type versions across dependencies.
- A .yarn/install-state.gz file was accidentally tracked, posing a merge conflict risk.

Fix & Changes:
- Added a 'resolutions' block in package.json to force '@types/react' and '@types/react-dom' to '^18.3.1'. This enforces a unified version of React types across all transitive dependencies, satisfying the type checker for older class components.
- Updated package 'name' to 'MacMock' and 'description' to 'Mac OS Simulator'.
- Corrected the repository URL to 'git@github.com:AmitRaikwar-in/MacMock.git'.
- Added '.yarn/install-state.gz' to .gitignore and removed it from the Git index.
Issue:
- Leftover development console.log and console.warn statements were cluttering the browser console.
- Unnecessary logs in the fullscreen wrapper and UserLogin flow were triggering on standard UI interactions.

Fix:
- Removed debug logs to ensure a clean console output and improve code cleanliness.

Changes:
- App.tsx: Removed console.warn statements from the try-catch blocks handling fullscreen rejections, replacing them with empty catch handlers.
- UserLogin.tsx: Removed console.log tracking login attempts/success states, and the console.warn for incorrect passwords from the handleLogin callback.
@ar1603 ar1603 force-pushed the amitraikwar/fix-react-types-ci branch 5 times, most recently from a753f0a to adf477c Compare April 20, 2026 00:05
Issue:
- The CI pipeline fails with TS2786: 'ResizableBox' cannot be used as a JSX component.
- This is caused by a conflict between React 18 types and the older TypeScript version (4.9.5), which is too strict about component return types for older class components.

Fix:
- Upgraded TypeScript to ^5.4.5, which allows components to return React.ReactNode.
- Unified and updated React types to ^18.3.3 across dependencies, devDependencies, and resolutions.
- Moved @types/react and @types/react-dom from dependencies to devDependencies.
- Updated @types/node to ^18.19.0 for better compatibility.
@ar1603 ar1603 force-pushed the amitraikwar/fix-react-types-ci branch from add1c3c to 438f8b3 Compare April 20, 2026 08:02
@ar1603 ar1603 merged commit f2b5e4d into development Apr 20, 2026
1 check passed
@ar1603 ar1603 deleted the amitraikwar/fix-react-types-ci branch April 20, 2026 08:10
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

Successfully merging this pull request may close these issues.

1 participant