Error map

Could not find a production build in the '.next' directory Next.js: Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server

Next.js · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). 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.

Could not find a production build in the '.next' directory — Next.js: Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server (Next.js)Could not f…module MIME type — Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html" (JavaScript)module MIME typeMIME type not executable — Refused to execute script from 'x' because its MIME type ('text/html') is not executable (JavaScript)MIME type not execu…Unexpected token < — SyntaxError: Unexpected token '<' (HTML served instead of JavaScript) (JavaScript)Unexpected token <ChunkLoadError — ChunkLoadError: Loading chunk 123 failed. (JavaScript)ChunkLoadErrorModule not found: Can't resolve 'x' (Next.js build) — Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src' (Next.js)Module not found: C…[Vue warn]: Component is missing template or render function — Vue: [Vue warn]: Component is missing template or render function. (Vue)[Vue warn]: Compone…Failed to compile: ESLint errors during next build — Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars (Next.js)Failed to compile: …Type error during next build — Next.js: Failed to compile. ./src/app/page.tsx:15:9 Type error: Type 'string | undefined' is not assignable to type 'string' (Next.js)Type error during n…next build: JavaScript heap out of memory — Next.js: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (during next build) (Next.js)next build: JavaScr…next build: fetch failed ECONNREFUSED (build-time API) — Next.js: Error occurred prerendering page "/blog" TypeError: fetch failed { cause: Error: connect ECONNREFUSED 127.0.0.1:3000 } (Next.js)next build: fetch f…Failed to fetch font from Google Fonts — Next.js: ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead / FetchError: request to https://fonts.googleapis.com failed (Next.js)Failed to fetch fon…404 on page refresh (history mode) — Browser: Cannot GET /users/42 — refreshing a Vue Router history-mode page returns 404 (Vue)404 on page refresh…App Service Application Error — Azure App Service: ":( Application Error" / container didn’t respond to HTTP pings (Azure)App Service Applica…FileNotFoundException assembly — Could not load file or assembly 'X, Version=…' or one of its dependencies (.NET)FileNotFoundExcepti…OPcache stale code — PHP still runs old code after deploy (OPcache not reset) (PHP)OPcache stale codeYou must install or update .NET to run this application — The framework 'Microsoft.NETCore.App', version '8.0.0' (x64) was not found. You must install or update .NET to run this application (.NET)You must install or…Refused to apply style from — Console: Refused to apply style from 'https://…/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type (Browser)Refused to apply st…Service worker registration failed — Console: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script (Browser)Service worker regi…SyntaxError: JSON — SyntaxError: Unexpected token < in JSON at position 0 (JavaScript)SyntaxError: JSONmissing ) — SyntaxError: missing ) after argument list (JavaScript)missing )already declared — SyntaxError: Identifier 'x' has already been declared (JavaScript)already declaredinvalid selector — DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector (JavaScript)invalid selectorCan't resolve 'fs' — Module not found: Can't resolve 'fs' (Next.js / webpack 5) (React)Can't resolve 'fs'Module parse failed — Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type (React)Module parse failedTypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…not a constructor — TypeError: x is not a constructor (JavaScript)not a constructorTDZ — ReferenceError: Cannot access 'x' before initialization (JavaScript)TDZELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEgyp ERR! — gyp ERR! build error / node-gyp rebuild failed (npm)gyp ERR!ERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPP…react-hooks/exhaustive-deps — React Hook useEffect has a missing dependency (react-hooks/exhaustive-deps) (React)react-hooks/exhaust…prisma generate — Error: @prisma/client did not initialize yet. Please run "prisma generate" (Node.js)prisma generatenode-sass — Error: Node Sass does not yet support your current environment (Node.js)node-sassERR_UNKNOWN_FILE_EXTENSION — TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" (Node.js)ERR_UNKNOWN_FILE_EX…TS2307 — TS2307: Cannot find module 'x' or its corresponding type declarations. (Node.js)TS2307TS7016 — TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type. (Node.js)TS7016heap out of memory — FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory (Node.js)heap out of memoryinvalid string length — RangeError: Invalid string length (JavaScript)invalid string leng…MaxListenersExceededWarning — MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listeners added (Node.js)MaxListenersExceede…Dynamic server usage — Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `cookies` (React)Dynamic server usagePrerender error — Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error (React)Prerender errorreact-scripts not found — 'react-scripts' is not recognized as an internal or external command / react-scripts: command not found (React)react-scripts not f…npm ETIMEDOUT — npm ERR! code ETIMEDOUT — network request to https://registry.npmjs.org/x failed, reason: connect ETIMEDOUT (npm)npm ETIMEDOUTPage is missing generateStaticParams() (output: export) — Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config (Next.js)Page is missing gen…Component provided template option but runtime compilation is not supported — Vue: [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js" (Vue)Component provided …Firebase Hosting: Page Not Found on refresh (SPA routes) — Firebase Hosting: Page Not Found — This file does not exist and there was no 404.html or index.html found in the document root (Google Cloud / Firebase)Firebase Hosting: P…Failed to find Server Action — Next.js: Error: Failed to find Server Action "abc123". This request might be from an older or newer deployment (Next.js)Failed to find Serv…Failed to fetch dynamically imported module / async component failed — Vue: TypeError: Failed to fetch dynamically imported module: https://app.example.com/assets/Settings-abc123.js (Vue)Failed to fetch dyn…

Directly related (12)

module MIME typeJavaScript

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html"

A or dynamic import got HTML back instead of JavaScript.

MIME type not executableJavaScript

Refused to execute script from 'x' because its MIME type ('text/html') is not executable

The browser fetched a script but the server labelled it text/html (usually an error page), so it refused to run it.

Unexpected token <JavaScript

SyntaxError: Unexpected token '<' (HTML served instead of JavaScript)

The browser loaded a .js file but received HTML (an error page or the SPA index.html).

ChunkLoadErrorJavaScript

ChunkLoadError: Loading chunk 123 failed.

A lazily loaded JavaScript chunk couldn’t be downloaded — usually because a new deployment removed the old hashed files.

Module not found: Can't resolve 'x' (Next.js build)Next.js

Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src'

Webpack/Turbopack couldn't resolve an import — wrong path/alias, missing dependency or case mismatch.

[Vue warn]: Component is missing template or render functionVue

Vue: [Vue warn]: Component is missing template or render function.

A component object has neither `template` nor `render`, or an SFC import resolved wrongly.

Failed to compile: ESLint errors during next buildNext.js

Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars

`next build` runs ESLint and fails the build on lint errors.

Type error during next buildNext.js

Next.js: Failed to compile. ./src/app/page.tsx:15:9 Type error: Type 'string | undefined' is not assignable to type 'string'

TypeScript type checking failed during `next build`, which blocks the deployment.

next build: JavaScript heap out of memoryNext.js

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).

next build: fetch failed ECONNREFUSED (build-time API)Next.js

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.

Failed to fetch font from Google FontsNext.js

Next.js: ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead / FetchError: request to https://fonts.googleapis.com failed

`next/font/google` couldn't download the font at build/dev time (offline, firewall or proxy).

404 on page refresh (history mode)Vue

Browser: Cannot GET /users/42 — refreshing a Vue Router history-mode page returns 404

In history mode the server must serve `index.html` for all routes; otherwise direct URLs/refreshes hit non-existent files.

Two steps away (36)

App Service Application ErrorAzure

Azure App Service: ":( Application Error" / container didn’t respond to HTTP pings

App Service started your app but it crashed or never listened on the expected port.

FileNotFoundException assembly.NET

Could not load file or assembly 'X, Version=…' or one of its dependencies

The runtime couldn’t find or load a referenced DLL — missing from the output, wrong version, or wrong platform (x86/x64).

OPcache stale codePHP

PHP still runs old code after deploy (OPcache not reset)

OPcache keeps serving cached bytecode, so changes uploaded to the server don’t take effect.

You must install or update .NET to run this application.NET

The framework 'Microsoft.NETCore.App', version '8.0.0' (x64) was not found. You must install or update .NET to run this application

The machine doesn’t have the .NET runtime version the app was built for (framework-dependent deployment).

Refused to apply style fromBrowser

Console: Refused to apply style from 'https://…/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type

The stylesheet URL returned something that is not CSS — usually a 404/HTML error page — and `X-Content-Type-Options: nosniff` mak…

Service worker registration failedBrowser

Console: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script

The browser could not fetch, parse or install the service worker script, or the page is not allowed to register one (HTTPS and sc…

SyntaxError: JSONJavaScript

SyntaxError: Unexpected token < in JSON at position 0

`JSON.parse()` / `response.json()` received something that isn’t JSON — very often an HTML error page.

missing )JavaScript

SyntaxError: missing ) after argument list

A function call’s parentheses are unbalanced — often an unescaped quote or a missing comma/plus.

already declaredJavaScript

SyntaxError: Identifier 'x' has already been declared

The same let/const/class name was declared twice in the same scope.

invalid selectorJavaScript

DOMException: Failed to execute 'querySelector' on 'Document': 'x' is not a valid selector

The CSS selector string is invalid — often an ID starting with a digit or containing special characters.

Can't resolve 'fs'React

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.

Module parse failedReact

Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type

Webpack found syntax it can’t parse because no loader is configured for that file (JSX, TypeScript, CSS, or modern syntax in node…

TypeError: not a functionJavaScript

TypeError: x is not a function

You called something as a function, but its value is not a function (it’s undefined, a string, an object…).

not a constructorJavaScript

TypeError: x is not a constructor

new was used with something that isn’t a class/constructor — usually a wrong import.

TDZJavaScript

ReferenceError: Cannot access 'x' before initialization

A let/const/class was used before its declaration line ran (temporal dead zone) — often a circular import.

ELIFECYCLEnpm

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!npm

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.

ERR_OSSL_EVP_UNSUPPORTEDNode.js

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.

react-hooks/exhaustive-depsReact

React Hook useEffect has a missing dependency (react-hooks/exhaustive-deps)

ESLint warns that the effect reads a value that isn’t in its dependency array, so it may use a stale value.

prisma generateNode.js

Error: @prisma/client did not initialize yet. Please run "prisma generate"

The generated Prisma Client is missing or out of date.

node-sassNode.js

Error: Node Sass does not yet support your current environment

node-sass (deprecated) has no binary for your Node version/OS.

ERR_UNKNOWN_FILE_EXTENSIONNode.js

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

Node tried to run a TypeScript file as ESM without a TypeScript loader.

TS2307Node.js

TS2307: Cannot find module 'x' or its corresponding type declarations.

TypeScript can’t resolve the import — the package isn’t installed, the path alias isn’t configured, or there are no types.

TS7016Node.js

TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type.

The JavaScript package has no TypeScript types bundled and no @types package installed.

heap out of memoryNode.js

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

The V8 heap hit its limit — a large build (webpack, tsc, Next.js) needs more memory, or the app leaks.

invalid string lengthJavaScript

RangeError: Invalid string length

A string grew beyond the engine’s maximum length — usually runaway concatenation or huge JSON.stringify output.

MaxListenersExceededWarningNode.js

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 listeners added

More than 10 listeners were added to one event — often a leak where listeners are added repeatedly.

Dynamic server usageReact

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).

Prerender errorReact

Error occurred prerendering page "/x". Read more: https://nextjs.org/docs/messages/prerender-error

A page threw an error while Next.js was rendering it at build time.

react-scripts not foundReact

'react-scripts' is not recognized as an internal or external command / react-scripts: command not found

node_modules is missing or broken, so the react-scripts binary isn’t available.

npm ETIMEDOUTnpm

npm ERR! code ETIMEDOUT — network request to https://registry.npmjs.org/x failed, reason: connect ETIMEDOUT

npm couldn’t reach the registry in time — network, proxy or firewall issue.

Page is missing generateStaticParams() (output: export)Next.js

Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config

A dynamic route can't be statically exported without telling Next.js which paths to generate.

Component provided template option but runtime compilation is not supportedVue

Vue: [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js"

A component uses a string `template` but the runtime-only Vue build has no compiler.

Firebase Hosting: Page Not Found on refresh (SPA routes)Google Cloud / Firebase

Firebase Hosting: Page Not Found — This file does not exist and there was no 404.html or index.html found in the document root

A single-page app route returns 404 when opened directly or refreshed, because Firebase Hosting looks for a real file at that pat…

Failed to find Server ActionNext.js

Next.js: Error: Failed to find Server Action "abc123". This request might be from an older or newer deployment

The browser called a Server Action ID the current server build doesn't know — usually a version skew after a deploy.

Failed to fetch dynamically imported module / async component failedVue

Vue: TypeError: Failed to fetch dynamically imported module: https://app.example.com/assets/Settings-abc123.js

A lazy-loaded route/component chunk couldn't be loaded (new deployment removed old chunks, network issue, or wrong base path).