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

[joke] its not fine #28524

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/react/src/ReactClient.js
Expand Up @@ -131,3 +131,17 @@ export {
useId,
act,
};

if (__DEV__) {
try {
// $FlowIgnore[cannot-resolve-module]
require('its-fine');
throw new Error(
'Module its-fine is not allowed. Please locate and uninstall the package(s) that depend on it.',
);
} catch (error) {
if (error.code !== 'MODULE_NOT_FOUND') {
throw error;
}
}
}
3 changes: 2 additions & 1 deletion scripts/error-codes/codes.json
Expand Up @@ -494,5 +494,6 @@
"506": "Functions are not valid as a child of Client Components. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.%s",
"507": "Expected the last optional `callback` argument to be a function. Instead received: %s.",
"508": "The first argument must be a React class instance. Instead received: %s.",
"509": "ReactDOM: Unsupported Legacy Mode API."
"509": "ReactDOM: Unsupported Legacy Mode API.",
"510": "Module its-fine is not allowed. Please locate and uninstall the package(s) that depend on it."
}