-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
🐛 BUG: React integration results in "[vite] Internal server error: Cannot set properties of undefined (setting 'isSelfAccepting')" #3465
Comments
I've observed this happening in dev mode with Solid as well. Everything seems to still work fine though, and the error doesn't show up again when changes are made to files. |
For me locally sometimes it triggers the Astro error dialog in the browser |
I'm trying out the reproduction, except this time, the following error is shown:
Possibly the HMR script is having some issues. Error only in dev, build seems fine. |
Here are some pointers to the changes in Vite which are related to this issue:
For some reason, a module reaches the import analysis plugin transform hook without being in the module graph. See: https:/vitejs/vite/blob/5161ecdc6c43b3fccf11e64dcc99b3d71140dcfc/packages/vite/src/node/plugins/importAnalysis.ts#L171 |
Thanks for chiming in @patak-dev! Definitely going to look at this one asap. |
Reproduce-able on all JSX based starters (React, Preact, Solid) |
"it must have been loaded so its entry is guaranteed in the module graph." Will investigate if we're the ones holding this wrong! |
Experiencing the same problem with Vue component imports. |
Are they JSX/TSX based components? I have a couple of Vue components and they are working find without this error - I've only seen it for React so far. |
Are there any known workarounds to resolve this? I've been having to run |
@stevenle The error should not block dev server builds from my experience. You are free to ignore the error and carry on developing across the JSX components I've tested. That said, I'm working on a fix by EOD today! |
In the project I'm working on, the page renders normally with SSR but any component that uses partial hydration fails. I tried with |
@natemoo-re @bholmesdev, following up here as @matthewp ended up uncovering a race condition in Vite after all. It wasn't that the id was changing, but the optimized dep was invalidated and removed from the module graph while doing the transform. That is why |
Closed by #3568, thanks a lot for the assist @patak-dev ! |
What version of
astro
are you using?1.0.0-beta.36
Are you using an SSR adapter? If so, which one?
No
What package manager are you using?
npm
What operating system are you using?
Windows and Linux
Describe the Bug
The React integration results in the following error:
I have confirmed this happens in both an existing Astro site and a brand new one made from https://astro.new/
To reproduce create a new Astro project with React integration.
Link to Minimal Reproducible Example
https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-react?file=package.json&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: