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

v2_dev crashes with React17 + ESM #7021

Closed
1 task done
xHomu opened this issue Aug 1, 2023 · 4 comments
Closed
1 task done

v2_dev crashes with React17 + ESM #7021

xHomu opened this issue Aug 1, 2023 · 4 comments

Comments

@xHomu
Copy link
Contributor

xHomu commented Aug 1, 2023

What version of Remix are you using?

v1.19.1

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

  • Yes

Steps to Reproduce

Change any of the following, and the template runs as expected:

I thought it might have been the default entry.server and entry.client, so I went ahead and grabbed the old react17 versions of the entry files, no luck: https://github.com/remix-run/remix/blob/d86cc1ed904ce98a04db3f9048f99ef6e710e9a4/templates/express/app/entry.server.tsx

Expected Behavior

Dev server runs, hmr working as expect (with React 17 caveats).

Actual Behavior

This error seems specific to the React 17 + ESM + v2 Dev Server combination, which results in the following errors:

image

@xHomu
Copy link
Contributor Author

xHomu commented Aug 1, 2023

@WillSmithTE

@jacob-ebey
Copy link
Member

React 17 does not have an exports map, this means if you want to use react 17 in an ESM runtime you'll have to import the /server deep import as react-dom/server.js.

@xHomu xHomu changed the title v2_dev doesn't with with React17 + ESM v2_dev crashes with React17 + ESM Aug 3, 2023
@brophdawg11 brophdawg11 added this to v2 Aug 3, 2023
@brophdawg11 brophdawg11 moved this to Backlog in v2 Aug 3, 2023
@pcattori
Copy link
Contributor

pcattori commented Aug 9, 2023

We're dropping support for React 17 in Remix v2, so not planning to address this. That said, just because it isn't officially supported doesn't mean it definitely won't work. I wouldn't be surprised if some app/entry.server.tsx could be crafted to get React 17 running

@pcattori pcattori closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2023
@pcattori pcattori moved this from Backlog to Closed in v2 Aug 9, 2023
@ryanflorence
Copy link
Member

Thanks Pedro. For a little more context on this decision there's a lot of good stuff we'll be bringing into v2 with v3_flags, and we don't want React 17 support making it all very difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Closed
Development

No branches or pull requests

5 participants