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
In React 19, the internal secret variable was renamed to _DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.
My first question is, why does it need to be prefixed with __CLIENT_INTERNALS and __SERVER_INTERNALS?
This causes an issue with my precompiled component library. I don't give those components "use client" directive because it's an icon library that doesn't need any hook. So, NextJS rendered them on server and this happened
I inspected the code of my icon library and found this
importy3from"react";
...
/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */
...
functionO(){vare=v.A;returne===null ? null : e.getOwner();}...varf3=y3, ... v=f3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ...
...
I noticed the internal secret is named __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE on server.
The error was solved when I manually changed the code.
My last question, is there any way to make the compiled code to use server secret if the client secret is not available and vice-versa? I don't want to manually edit the code after compiling them whenever I add new icons in future
Thank you!
PS. The error only happens when I run npm run dev.
The text was updated successfully, but these errors were encountered:
In React 19, the internal secret variable was renamed to
_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
.My first question is, why does it need to be prefixed with
__CLIENT_INTERNALS
and__SERVER_INTERNALS
?This causes an issue with my precompiled component library. I don't give those components
"use client"
directive because it's an icon library that doesn't need any hook. So, NextJS rendered them on server and this happenedI inspected the code of my icon library and found this
I noticed the internal secret is named
__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
on server.The error was solved when I manually changed the code.
My last question, is there any way to make the compiled code to use server secret if the client secret is not available and vice-versa? I don't want to manually edit the code after compiling them whenever I add new icons in future
Thank you!
PS. The error only happens when I run
npm run dev
.The text was updated successfully, but these errors were encountered: