-
Notifications
You must be signed in to change notification settings - Fork 36
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
JSX type errors caused by multiple versions of @types/react
#324
Comments
@kumar303 I'm not sure which board we use to track issues for this repository. Which project board would be appropriate to add this one to? |
Ok so this is interesting: I deleted
This makes me conclude that something iffy is going on in the resolver of EDIT: This is the issue related to that on the yarnpkg issue tracker: yarnpkg/yarn#4489 |
Thanks for filing this, Marvin. We are tracking this in a few places, scattered across various repos 😅 Here's the upstream issue in |
Still getting this issue with CLI. 3.0 when trying to use UI components:
Not sure how to fix it other than adding ts-ignores everywhere. Code's looking wonky:
|
This issue has since been resolved in the CLI version 3.16.2. |
Please list the package(s) involved in the issue, and include the version you are using
@shopify/checkout-ui-extensions-react 0.15.0
@shopify/shopify-cli-extensions 0.2.1
Describe the bug
A new projected created by our CLI with the
typescript-react
template has type errors.Steps to reproduce the behavior:
shopify extension create
and follow instructions (pick the ´typescript-react` templatesrc/index.tsx
in your editor -> Type ERRORExpected behavior
There should be no type errors when creating a brand new extension. This doesn't make for a good first time impression.
Screenshots
Additional context
Did some digging and the issue is caused by multiple versions of
@types/react
being present at the same time. One versionv17.0.45
is installed by being a direct dependency of@remote-ui/react
and the other one is coming from@types/react-reconciler
which just has"@types/react": "*"
listed in its dependencies. This leads to that package installing@types/react v18.0.9
on top of the already existing17.0.45
. Because both packages define the same types globally, there is a conflict and we'll end up with type errors in our editor as pictured above.The text was updated successfully, but these errors were encountered: