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

Document a gotcha where linking this package leads to conflicting @types/react copies #70

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

robintown
Copy link
Member

I spent a good couple hours today struggling to yarn link this package in a way that wouldn't create type errors in my Element Call checkout, and feel compelled to write down my workaround somewhere that others can find it.

…pes/react copies

I spent a good couple hours today struggling to yarn link this package in a way that wouldn't create type errors in my Element Call checkout, and feel compelled to write down my workaround somewhere that others can find it.
@robintown robintown requested a review from a team as a code owner September 7, 2023 00:54
@robintown robintown requested review from t3chguy and florianduros and removed request for a team September 7, 2023 00:54
Copy link

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@t3chguy
Copy link
Member

t3chguy commented Sep 7, 2023

Would resolutions not be a better workaround?

image

@robintown
Copy link
Member Author

I did try that, yeah, but even with identical versions in node_modules/@types/react and node_modules/@vector-im/compound-web/node_modules/@types/react, I was getting the same set of 182 errors… not sure what to make of that since it somehow works for Element Web

@robintown robintown merged commit f91ce44 into element-hq:main Sep 7, 2023
2 of 4 checks passed
@robintown
Copy link
Member Author

Using resolutions is also not a great solution IMO because it requires you to keep the versions exactly in sync, which is a job that I feel should be left to Yarn to handle automatically. (which it does as long as you don't use linking, and the versions requested are compatible)

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.

3 participants