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

Demo Store: Typecheck issues when using the defer utility and 'typeof loader' #972

Closed
altonchaney opened this issue Jun 1, 2023 · 1 comment

Comments

@altonchaney
Copy link
Contributor

What is the location of your example repository?

Hydrogen Demo Store

Which package or tool is having this issue?

Oxygen

What version of that package or tool are you using?

1.0.7

What version of Remix are you using?

1.15.0

Steps to Reproduce

After installing the latest Demo Store project dependencies, run the typecheck cli command and note the various errors that arise specifically from using the defer utility.

Expected Behavior

I expect to see no type check errors when using the defer utility from @shopify/remix-oxygen.

Actual Behavior

When typing the route component's useLoaderData using typeof loader, you can see it doesn't properly type any return data from the defer utility in the loader function. However, when I explicitly type that return data there is no longer an issue. So far I've seen this issue in our own project but the latest Demo Store (1.0.2) also has the same issue.

@altonchaney altonchaney changed the title [Demo Store] Typecheck issues when using the defer utility and 'typeof loader' Demo Store: Typecheck issues when using the defer utility and 'typeof loader' Jun 1, 2023
@blittle blittle mentioned this issue Jun 1, 2023
5 tasks
@blittle
Copy link
Contributor

blittle commented Jun 21, 2024

This happens when the server version of remix mismatches with the client version. Make sure to upgrade Hydrogen with the h2 upgrade command which makes sure the dependencies align.

@blittle blittle closed this as completed Jun 21, 2024
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

2 participants