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

dev 1.18.0 error when using React v17 #6710

Closed
1 task done
SeanGroff opened this issue Jun 27, 2023 · 7 comments · Fixed by #6725
Closed
1 task done

dev 1.18.0 error when using React v17 #6710

SeanGroff opened this issue Jun 27, 2023 · 7 comments · Fixed by #6725

Comments

@SeanGroff
Copy link
Contributor

What version of Remix are you using?

1.18.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Setup a basic Remix project that uses Remix 1.18.0 and React/React-dom version 17.
Someting like create remix app then downgrade React.
Enable the new HMR dev server in the remix config.
Run npm run dev

An error occurs:

Screenshot_2023-06-27_at_3 25 11_PM

cc: @pcattori Issue filed as requested on Discord

Expected Behavior

The dev server serves up the local site without errors

Actual Behavior

Error "Could not resolve react-dom/client"

@pcattori
Copy link
Contributor

Can you try adding a .catch() to the offending import within your node_modules/? Just to verify if that does anything.

// node_modules/@remix-run/dev/dist/config/defaults/entry.dev.ts

export default () => {
  import("react");
  import("react/jsx-dev-runtime");
  import("react/jsx-runtime");
  import("react-dom");
  import("react-dom/client").catch();
  import("react-refresh/runtime");
  import("@remix-run/react");
  import("remix:hmr");
};

@joshmedeski
Copy link

Hey @pcattori, I'm having the same problem and catching the react-dom/client import fixed it!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-0657c16-20230630 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.18.1-pre.2 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-7abaf9f-20230701 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants