You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I share solutions for people who are experiencing issues like #634
This problem caused by ghost dependencies in yarn pnp mode.
It because @types/react package is not defined as the package's peerDependencies, so the type of react cannot be found.
I leave a fix for those who have experienced the same problems as me.
add below code in .yarnrc.yml file in your project root
(Of course @types/react must be defined in your project's package.json :) )
The text was updated successfully, but these errors were encountered:
winty56
changed the title
JSX element class does not support Error if using yarn2 pnp mode with typescript
Carousel' cannot be used as a JSX component Error if using yarn2 pnp mode with typescript
Jul 19, 2024
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I share solutions for people who are experiencing issues like #634
This problem caused by ghost dependencies in yarn pnp mode.
It because @types/react package is not defined as the package's peerDependencies, so the type of react cannot be found.
I leave a fix for those who have experienced the same problems as me.
add below code in
.yarnrc.yml
file in your project root(Of course @types/react must be defined in your project's package.json :) )
The text was updated successfully, but these errors were encountered: