Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
exportar 'useSyncExternalStore' (importado como 'React') no se encontró en 'react'

Al intentar ejecutar mi proyecto me sale el siguiente error:

 ERROR in ./node_modules/@mui/material/useMediaQuery/useMediaQuery.js 78:16-42 export 'useSyncExternalStore' (imported as 'React') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)

El archivo problemático con el error tiene una función que se ve así:

 function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) { const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]); const getServerSnapshot = React.useMemo(() => { if (ssrMatchMedia !== null) { const { matches } = ssrMatchMedia(query); return () => matches; } return getDefaultSnapshot; }, [getDefaultSnapshot, query, ssrMatchMedia]); const [getSnapshot, subscribe] = React.useMemo(() => { if (matchMedia === null) { return [getDefaultSnapshot, () => () => {}]; } const mediaQueryList = matchMedia(query); return [() => mediaQueryList.matches, notify => { // TODO: Use `addEventListener` once support for Safari < 14 is dropped mediaQueryList.addListener(notify); return () => { mediaQueryList.removeListener(notify); }; }]; }, [getDefaultSnapshot, matchMedia, query]); const match = React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); // the problem lies on the upper line of code return match; }

No se como solucionar este problema y llevo un tiempo googleando sin encontrar suficientes soluciones, alguna idea?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tuve el mismo problema cuando actualicé react-scripts de 4.0.3 a 5.0.0

El problema se solucionó en @mui/material@^5.2.1

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!