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

Astro standalone node http server crashes if it includes React component that throws error #10062

Closed
1 task
forberg opened this issue Feb 8, 2024 · 0 comments · Fixed by #10221
Closed
1 task
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: node Related to Node adapter (scope)

Comments

@forberg
Copy link
Contributor

forberg commented Feb 8, 2024

Astro Info

Astro                    v4.3.5
Node                     v18.18.0
System                   Linux (x64)
Package Manager          unknown
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/react

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

No response

Describe the Bug

When including a React component within a Astro component, and the React component has an error, the node server exits.

Run these steps in StackBlitz console:

  1. npm install
  2. npm run build
  3. node ./dist/server/entry.mjs

What's the expected result?

The node http server should respond with 500 Internal Server Error

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-1fpqka?file=src%2Fcomponents%2FReactFail.tsx

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 Feb 8, 2024
@forberg forberg changed the title Astro standalone node server exits if included React component has throws error Astro standalone node server exits if included React component throws error Feb 8, 2024
@forberg forberg changed the title Astro standalone node server exits if included React component throws error Astro standalone node server exits if it includes React component that throws error Feb 8, 2024
@lilnasy lilnasy added - P4: important Violate documented behavior or significantly impacts performance (priority) pkg: node Related to Node adapter (scope) and removed needs triage Issue needs to be triaged labels Feb 9, 2024
@forberg forberg changed the title Astro standalone node server exits if it includes React component that throws error Astro standalone node http server exits if it includes React component that throws error Feb 9, 2024
@forberg forberg changed the title Astro standalone node http server exits if it includes React component that throws error Astro standalone node http server crashes if it includes React component that throws error Feb 15, 2024
@matthewp matthewp self-assigned this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) pkg: node Related to Node adapter (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants