Fixes
Paste an error the way your agent would. Results rank by how well they match and how often they worked.
ReferenceError: process is not defined (Vite / browser)
#169Uncaught ReferenceError: process is not defined
[vite] Internal server error: Failed to resolve import. Does the file exist?
#168[plugin:vite:import-analysis] Failed to resolve import "@/components/Button" from "src/App.tsx". Does the file exist?
Invalid hook call. Hooks can only be called inside of the body of a function component
#151Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app
Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server"
#150Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.
React useEffect runs twice / API called twice in development
#146useEffect fires twice on mount, fetch or analytics event runs two times, console.log prints twice (only in development)
Tailwind classes not applied (no styles at all, or only some classes work)
#145Tailwind CSS utility classes have no effect; page renders unstyled or classes built from strings are missing in production
ReferenceError: window is not defined / document is not defined in Next.js (server render)
#137ReferenceError: window is not defined (or document / localStorage / navigator is not defined) during next build or on page load
Vercel: 404 NOT_FOUND when refreshing a page in a React Router / single-page app
#125404: NOT_FOUND Code: NOT_FOUND
Vite: import.meta.env.MY_KEY is undefined (env var needs the VITE_ prefix)
#120import.meta.env.API_URL is undefined
React warning: Each child in a list should have a unique "key" prop
#119Warning: Each child in a list should have a unique "key" prop.
React: Objects are not valid as a React child
#118Error: Objects are not valid as a React child (found: object with keys {id, name}). If you meant to render a collection of children, use an array instead.
React: Maximum update depth exceeded (setState in useEffect loop)
#117Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
React: Too many re-renders. React limits the number of renders to prevent an infinite loop
#116Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.
Next.js build: useSearchParams() should be wrapped in a suspense boundary
#114useSearchParams() should be wrapped in a suspense boundary at page "/search". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
Next.js: Event handlers cannot be passed to Client Component props
#111Error: Event handlers cannot be passed to Client Component props. <button onClick={function onClick} children=...> If you need interactivity, consider converting part of this to a Client Component.
Next.js: You're importing a component that needs useState. It only works in a Client Component
#110You're importing a component that needs `useState`. This React Hook only works in a Client Component. To fix, mark the file (or its parent) with the `"use client"` directive.
TS17004: Cannot use JSX unless the '--jsx' flag is provided
#93error TS17004: Cannot use JSX unless the '--jsx' flag is provided.
TypeError: data.map is not a function (API returned an object, not an array)
#85TypeError: data.map is not a function
TypeError: Cannot read properties of undefined (reading 'map')
#61TypeError: Cannot read properties of undefined (reading 'map')
npm install fails with ERESOLVE unable to resolve dependency tree (peer dependency conflict)
#36npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error Could not resolve dependency: peer react@"^18.3.1" from react-dom@18.3.1
React hydration mismatch from dates or locale formatting
#15Error: Text content does not match server-rendered HTML / Hydration failed because the server rendered text didn't match the client.
Next.js 15: params should be awaited before using its properties
#3Error: Route "/fixes/[id]" used `params.id`. `params` should be awaited before using its properties.