Error map
You have a Server Component that imports next/router. Use next/navigation instead Next.js: You have a Server Component that imports next/router. Use next/navigation instead
Next.js · layer 1, On your device
Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (9)
You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client"
In the Next.js App Router, a component using hooks or browser APIs is rendered as a Server Component.
Error: NextRouter was not mounted.
next/router’s useRouter was used inside the App Router (app/ directory), which uses next/navigation instead.
Next.js: You're importing a component that needs createContext. It only works in a Client Component but none of its parents are marked with "use client"
A context provider (or a lib that uses `createContext`) is used in a Server Component.
Next.js: Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead
`` received `undefined` (or another invalid value), so Next.js can't build the link.
Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 }
During `next build` a page tried to fetch data from a server (often your own app or an API) that isn't running yet.
Next.js: Error: No HTTP methods exported in '/app/api/users/route.ts'. Export a named export for each HTTP method (GET, POST...)
A Route Handler file exports no recognised HTTP method function.
Next.js 13+: Error: Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>
Since Next.js 13 `` renders its own ``, so nesting your own `` is invalid.
Next.js: You are attempting to export "metadata" from a component marked with "use client", which is disallowed
`metadata`/`generateMetadata` can only be exported from Server Components.
Vue Router: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/home"
`router.push` to the route you're already on, rejecting the promise (Vue Router 3.1+).
Two steps away (21)
Error: Hydration failed because the initial UI does not match what was rendered on the server
The HTML rendered on the server differs from the first client render, so React (Next.js/Remix) can’t attach to it.
Module not found: Can't resolve 'fs' (Next.js / webpack 5)
A Node.js built-in (fs, path, crypto, net) is imported into code that runs in the browser bundle.
Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies`
Next.js tried to statically render a route that reads request-specific data (cookies, headers, searchParams).
HTTP 405 Method Not Allowed
The URL exists, but it doesn’t accept the HTTP method you used (e.g. POST to a GET-only route).
TypeError: Missing parameter name at 1 (path-to-regexp)
An Express 5 (path-to-regexp v8) route uses old wildcard syntax like '*' or '/:id?'.
No routes matched location "/x"
React Router found no route definition for the current URL.
Error: useNavigate() may be used only in the context of a <Router> component.
A React Router hook ran in a component that isn’t rendered inside a Router provider.
TypeError: Cannot destructure property 'user' of 'useContext(...)' as it is undefined.
A component read a context with no matching Provider above it.
Error: No QueryClient set, use QueryClientProvider to set one
TanStack Query hooks ran outside a QueryClientProvider (or a duplicate copy of the library is installed).
Warning: Received `true` for a non-boolean attribute `x`.
A boolean was passed to a DOM attribute that expects a string, or a custom prop leaked through to a DOM element.
Warning: `key` is not a prop. Trying to access it will result in `undefined` being returned.
A component tried to read props.key, which React reserves and never passes down.
Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build)
Node ran out of memory while building a large Next.js app (or on a small CI/Vercel runner).
npm ERR! code ELIFECYCLE / Command failed with exit code 1
An npm script (build, start, test, postinstall) exited with an error. ELIFECYCLE is only the wrapper — the real error is printed…
gyp ERR! build error / node-gyp rebuild failed
A dependency with native C/C++ code couldn’t compile — missing build tools, Python, or an unsupported Node version.
Error: error:0308010C:digital envelope routines::unsupported
An old build tool (webpack 4, old react-scripts) uses a hash algorithm that OpenSSL 3 in Node 17+ disables.
Next.js: ⨯ Conflicting app and page file was found, please remove the conflicting files to continue: "pages/index.tsx" - "app/page.tsx"
The same URL is defined in both the `app` and `pages` directories.
Browser: Access to fetch at 'https://api.example.com/api/data' from origin 'https://app.example.com' has been blocked by CORS policy (Next.js route handler)
A cross-origin request to your Next.js API route is blocked because the response lacks CORS headers.
Next.js: You're importing a component that needs "server-only". That only works in a Server Component
A Client Component (or a file it imports) pulls in server-only code — database clients, secrets, next/headers or a module marked…
Vue: [Vue warn]: Failed to resolve component: x
The template uses a component tag that isn’t registered or imported where it’s used.
Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders
A child component assigned to a prop. Props flow one way — the parent owns the value.
Vue Router: [Vue Router warn]: No match found for location with path "/users/42"
The router has no route record matching that path (typo, missing route, or case/base issue).
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError