1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @flow
    
  8.  */
    
  9. 
    
  10. import * as React from 'react';
    
  11. 
    
  12. const ReactSharedServerInternals =
    
  13.   // $FlowFixMe: It's defined in the one we resolve to.
    
  14.   React.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    
  15. 
    
  16. if (!ReactSharedServerInternals) {
    
  17.   throw new Error(
    
  18.     'The "react" package in this environment is not configured correctly. ' +
    
  19.       'The "react-server" condition must be enabled in any environment that ' +
    
  20.       'runs React Server Components.',
    
  21.   );
    
  22. }
    
  23. 
    
  24. export default ReactSharedServerInternals;