Skip to content

Bug: Browser builds of /static and /server hang indefinitely in Node upon completion in v19 #32965

@rschristian

Description

@rschristian

When running in Node, renderToString (along with all other rendering methods, from my tests) from react-dom/server.browser and prerender from react-dom/static.browser seem to hang indefinitely -- the actual rendering completes just fine but the Node process is completely stuck afterwards and will not exit. This was not the case in v18, server.browser worked just fine in Node there.

React version: 19.1.0

Steps To Reproduce

// index.js
import { jsx } from 'react/jsx-runtime';
import { renderToString } from 'react-dom/server.browser';

const App = () => jsx("h1", { children: "Hello World!" });

const content = renderToString(jsx(App, {}));

console.log(content); // Prints `<h1>Hello World!</h1>` as expected, no issue here
  1. $ node ./index.js

Code example: https://stackblitz.com/edit/node-6nxmucbr?file=index.js

The current behavior

Hangs indefinitely, process will not exit once prerendering has completed

The expected behavior

Process should exit once prerendering has completed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions