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

React 19 Beta throws error when starting astro dev server #10940

Closed
1 task
oemer-aran opened this issue May 2, 2024 · 3 comments · Fixed by #10942
Closed
1 task

React 19 Beta throws error when starting astro dev server #10940

oemer-aran opened this issue May 2, 2024 · 3 comments · Fixed by #10942
Assignees
Labels
pkg: react Related to React (scope)

Comments

@oemer-aran
Copy link

oemer-aran commented May 2, 2024

Astro Info

astro info
Astro v4.7.1
Noda v18.18.0
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations @astrojs/react

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Using React 19 Beta results in following error:

[ERROR] Missing "./server.js" specifier in "react-dom" package
  Stack trace:
    at C:\dev\project-name\node_modules\.pnpm\v[email protected]_@[email protected]\node_modules\vite\dist\node\chunks\dep-cNe07EU9.js:47597:25
    [...] See full stack trace in the browser, or rerun with --verbose.

I followed the official React 19 Beta installation guide: https://react.dev/blog/2024/04/25/react-19-upgrade-guide

If the stackblitz doesn't not show the error and just a blank screen, try npm install --force or yarn install.

What's the expected result?

Astro working with React 19 without any error.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-2hppzz?file=package.json,.vscode%2Flaunch.json,src%2Fpages%2Findex.astro&title=Astro%20Starter%20Kit:%20Basics

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label May 2, 2024
@matthewp matthewp added pkg: react Related to React (scope) and removed needs triage Issue needs to be triaged labels May 3, 2024
@matthewp matthewp self-assigned this May 3, 2024
@matthewp
Copy link
Contributor

matthewp commented May 3, 2024

We don't currently support 19 which is currently in beta. I'll see what it takes to allow it.

@zhondori
Copy link

zhondori commented Jun 4, 2024

@matthewp hello Matthew. I'm also encountering this issue with my project. But error is little different.

 error   Missing "./errors" specifier in "astro" package

in my case I'm not even using React 19. its React 18.3.1. Astro version is 2.0.0

@tparsons-godaddy
Copy link

@zhondori I have the same error. Have you seen any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: react Related to React (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants