Skip to content
The Chat Archive
o3-2025-04-16· OpenAI LMArena Human Preference 140K

what is the issue? react-dom-client.development.js:24868 Download the React DevTools for…

  1. User

    what is the issue? react-dom-client.development.js:24868 Download the React DevTools for a better development experience: https://react.dev/link/react-devtools reconciler-31.js:10 Uncaught TypeError: Eo is not a function at Yr (reconciler-31.js:10:188913) at kl (reconciler-31.js:10:198750) at yl (reconciler-31.js:10:197583) at bl (reconciler-31.js:10:198043) at yl (reconciler-31.js:10:197645) at bl (reconciler-31.js:10:198043) at yl (reconciler-31.js:10:197645) at bl (reconciler-31.js:10:198043) at yl (reconciler-31.js:10:197645) at bl (reconciler-31.js:10:198043) react-dom-client.development.js:8283 An error occurred in the component.

    Consider adding an error boundary to your tree to customize error handling behavior. Visit https://react.dev/link/error-boundaries to learn more about error boundaries.

    defaultOnUncaughtError @ react-dom-client.development.js:8283 [NEW] Explain Console errors by using Copilot in Edge: click

     to explain an error. 
    Learn more
    Don't show again
    
  2. Assistant

    That call-stack is telling us three useful things:

    1. The crash bubbles out of React’s reconciler (“reconciler-31.js … Eo is not a function”).
    2. React then surfaces it as: “An error occurred in the <PDFViewer> component.”
    3. Nothing else in your own code shows up in the stack (so the problem is almost certainly inside, or just around, the <PDFViewer> component).

    Translation: React tried to render <PDFViewer> and somewhere in that component tree it called a function that was not actually a function.
    The most common reasons that happens with the various PDF-viewer libraries are shown below.

    ───────────────────────────────────────────── POSSIBLE ROOT CAUSES & FIXES ─────────────────────────────────────────────

    1. Two copies of React are being bundled
      • Symptom: deep “reconciler” errors, very little of your own code in the stack.
      • Why it happens: a PDF component (or any dependency that pulls in React as a normal dependency instead of a peer dependency) gets its own copy of React.
      • Fixes
      – Inspect your bundle / yarn why react or npm ls react. There should be exactly one copy.
      – If a library incorrectly lists "react": "^18" in dependencies, add an alias or resolutions block to force hoisting:

      ```jsonc
      // package.json
      {
        "resolutions": {
          "react": "^18.2.0",
          "react-dom": "^18.2.0"
        }
      }
      ```
      

      – Re-install node-modules, clear lock-file if necessary.

    2. Mixing mismatched versions of the PDF viewer / renderer and React
      • Example: @react-pdf/renderer@2.x expects React 17. You upgraded React to 18.
      • Fixes
      – Upgrade the PDF library (npm i @react-pdf/renderer@latest) or pin React to the version the lib expects.
      – Check the library’s release notes—many bumped major versions solely to add React-18 support.

    3. Using the wrong component or wrong props
      • @react-pdf/renderer exports two different viewers:

      import { Document, Page, PDFViewer } from '@react-pdf/renderer';
      
      // ✅ correct usage
      <PDFViewer width="100%" height="600">
        <Document>
          <Page size="A4">
            <Text>Hello PDF</Text>
          </Page>
        </Document>
      </PDFViewer>
      

      • Passing a prop that the component doesn’t expect (e.g. file while you actually imported the @react-pdf/renderer viewer, not react-pdf/Viewer) can make it execute undefined(...).

    4. Rendering the PDF viewer during server-side rendering (Next.js, Remix, etc.)
      • PDFViewer relies on browser APIs (Canvas, Blob, etc.); if it runs on the server you get a cryptic error.
      • Fix

      // Next.js example
      const PDFViewerNoSSR = dynamic(
        () => import('@react-pdf/renderer').then(mod => mod.PDFViewer),
        { ssr: false }
      );
      
    5. Corrupted / cached node_modules build
      • Delete node_modules + lock file → reinstall.

    ───────────────────────────────────────────── DIAGNOSTIC CHECKLIST ─────────────────────────────────────────────

    # 1️⃣ Verify single React
    npm ls react react-dom
    # 2️⃣ Check pdf viewer versions
    npm list @react-pdf/renderer react-pdf @react-pdf-viewer/core
    # 3️⃣ Delete caches
    rm -rf node_modules .turbo .next dist && npm i
    # 4️⃣ Reproduce in minimal sandbox
    

    ───────────────────────────────────────────── QUICK “TRY THIS FIRST” FIX ─────────────────────────────────────────────

    # keep React & React-DOM in sync
    npm i react@18.2.0 react-dom@18.2.0
    
    # upgrade the PDF library (example)
    npm i @react-pdf/renderer@3
    
    # wipe & rebuild
    rm -rf node_modules package-lock.json && npm i && npm run dev
    

    ───────────────────────────────────────────── ADD AN ERROR BOUNDARY (so the whole app doesn’t blank out) ─────────────────────────────────────────────

    class PDFErrorBoundary extends React.Component {
      state = { hasError: false };
    
      static getDerivedStateFromError() { return { hasError: true }; }
    
      render() {
        if (this.state.hasError) {
          return <p>🙈 Couldn’t render the PDF.</p>;
        }
        return this.props.children;
      }
    }
    
    // usage
    <PDFErrorBoundary>
      <PDFViewer>…</PDFViewer>
    </PDFErrorBoundary>
    

    ───────────────────────────────────────────── STILL STUCK? ─────────────────────────────────────────────

    1. Drop the exact versions of react, react-dom, and your PDF library here.
    2. Paste the code where you import & render <PDFViewer>.
    3. Let me know whether you’re using Next.js / Remix / Vite / CRA.

    With that info we can zero-in on the specific cause in a few minutes.

  3. User

    D:\Resume Builder>npm install @react-pdf/renderer@3.1.12 npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: resume-builder@0.0.0 npm error Found: react@19.1.0 npm error node_modules/react npm error react@"^19.1.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^16.8.6 || ^17.0.0 || ^18.0.0" from @react-pdf/renderer@3.1.12 npm error node_modules/@react-pdf/renderer npm error @react-pdf/renderer@"3.1.12" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error C:\Users\Administrator\AppData\Local\npm-cache_logs\2025-06-30T12_48_42_598Z-eresolve-report.txt npm error A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache_logs\2025-06-30T12_48_42_598Z-debug-0.log

  4. Assistant

    npm is refusing to finish because the versions you’re asking it to wire together don’t satisfy each other’s peer-dependency rules:

    • You have react 19.1.0 in your project.
    • @react-pdf/renderer 3.1.12 explicitly says it can work with React 16, 17 or 18 only:

    "peerDependencies": {
      "react": "^16.8.6 || ^17.0.0 || ^18.0.0"
    }
    

    So npm stops and throws ERESOLVE.

    You now have three realistic choices 👇

    ──────────────────────────────────────── 1️⃣ Stay on React 19? → Use another PDF lib (or wait) ──────────────────────────────────────── At the moment no stable release of @react-pdf/renderer advertises support for React 19. If you want to keep React 19 you could:

    • switch to a different viewer that’s already React-19 compatible
    – react-pdf (https://github.com/wojtekmaj/react-pdf)
    – @react-pdf-viewer/core (https://react-pdf-viewer.dev)

    • or keep using @react-pdf/renderer but install it with --force / --legacy-peer-deps (not recommended → runtime risk, no type defs updated).

    Example (👎 risky):

    npm i @react-pdf/renderer@3.1.12 --force
    

    If it crashes again, you’ll know why.

    ──────────────────────────────────────── 2️⃣ Need @react-pdf/renderer? → Downgrade React to 18 ──────────────────────────────────────── @react-pdf/renderer v3.x is tested against React 18.
    That path is the least painful:

    # remove current React 19
    npm uninstall react react-dom
    
    # install versions the pdf renderer supports
    npm i react@18.2.0 react-dom@18.2.0
    
    # now install the pdf renderer
    npm i @react-pdf/renderer@3.1.12
    

    ──────────────────────────────────────── 3️⃣ Experimental builds / local fork ──────────────────────────────────────── If you absolutely have to run React 19 + @react-pdf/renderer today you can:

    1. Fork the library
    2. Bump its peer-dependency range to include “^19.0.0”
    3. Fix whatever compile/runtime errors appear (quite a few APIs changed in 19).

    That’s extra maintenance cost, so only do it if you’re comfortable owning the fork.

    ──────────────────────────────────────── What I’d do right now ──────────────────────────────────────── Unless React 19 features are mission-critical for your app today, downgrade to React 18, get your PDF feature working, and revisit React 19 once the ecosystem catches up.

    Let me know which route you’d like to take and I can give you the exact commands / code changes.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.