You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle cross-page client reference contamination in development
In development, React is tracking I/O for debugging purposes. Under some
circumstances it can happen that I/O that is cached in a global
(generally not recommended!) might be triggered by a component of one
page (the owner of that I/O) and also emitted as I/O debug info for a
component of another page that depends on it. If the owner references
client components in its props, those couldn't be serialized for the
other page because they don't exist in the client reference manifest of
that page, leading to the following error:
```
Error: Could not find the module "<ID>" in the React Client Manifest.
This is probably a bug in the React Server Components bundler.
```
To support that case, we're now looking for client references in
manifests of other pages, but only in development mode.
A better fix might be to pass a joint `debugBundlerConfig` option to
React, alongside the normal `bundlerConfig` option, or something like
that. But for now, this should suffice.
Another option we considered but disregarded is a change in React to
ignore missing client references when emitting them as debug info, and
emitting an omission placeholder instead. But for the general case this
would mask real bugs in the RSC bundler.
fixes#85883
Copy file name to clipboardExpand all lines: packages/next/errors.json
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -947,5 +947,8 @@
947
947
"946": "Failed to deserialize errors.",
948
948
"947": "Expected `sendErrorsToBrowser` to be defined in renderOpts.",
949
949
"948": "Failed to serialize errors.",
950
-
"949": "Route %s errored during %s. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.\n\nOriginal Error: %s"
950
+
"949": "Route %s errored during %s. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.\n\nOriginal Error: %s",
951
+
"950": "The manifests singleton was not initialized.",
952
+
"951": "The client reference manifest for route \"%s\" does not exist.",
953
+
"952": "Cannot access \"%s\" without a work store."
0 commit comments