Error map
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 · layer 1, On your device
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.
Directly related (12)
TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.)
TypeScript requires you to handle the case where a value may be undefined before using it.
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
Node tried to run a TypeScript file as ESM without a TypeScript loader.
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
A value’s type doesn’t match the function parameter — commonly a possibly-undefined value passed where a definite one is required.
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.
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.
TS2304: Cannot find name 'x'.
TypeScript doesn’t know an identifier — a missing import, missing type definitions (e.g. for Node or Jest globals), or a typo.
TS2339: Property 'x' does not exist on type 'Y'.
TypeScript’s type for the object doesn’t include that property.
TS2322: Type 'X' is not assignable to type 'Y'
You assigned a value whose type doesn’t match the declared type of the variable, property or return value.
Vue: [Vue warn]: Component is missing template or render function.
A component object has neither `template` nor `render`, or an SFC import resolved wrongly.
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.
Next.js 15: Error: Route "/blog/[slug]" used `params.slug`. `params` should be awaited before using its properties
In Next.js 15 `params` and `searchParams` are Promises; reading properties synchronously triggers this error/warning.
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.
Two steps away (36)
TypeError: Cannot read properties of undefined (reading 'x')
You tried to access a property on a value that is `undefined` (or `null`) — usually data that hasn’t loaded yet or a wrong proper…
TypeError: x is not iterable
for…of, spread or destructuring was used on something that isn’t an array/iterable.
TypeScript: error TS2531: Object is possibly 'null'.
You used a value that can be `null` without checking it first (strictNullChecks).
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
CommonJS code used `require()` on a package that is ES-module-only (node-fetch 3, chalk 5, nanoid 4, got 12…).
SyntaxError: Cannot use import statement outside a module
An `import` statement ran in a context treated as CommonJS (Node without "type": "module", a browser script without type="module"…
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module needs an import attribute of "type: json"
An ES module imported a .json file without the required import attribute.
java.lang.ClassCastException: class A cannot be cast to class B
An object was cast to a type it isn’t.
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
A Node API got an argument of the wrong type — usually undefined because an env var or config value is missing.
System.InvalidCastException: Unable to cast object of type 'X' to type 'Y'
An explicit cast failed because the object’s runtime type isn’t the target type.
Error: Cannot find module 'x' (MODULE_NOT_FOUND)
Node can’t resolve the module path — the package isn’t installed, or a relative path/extension is wrong.
[vite] Internal server error: Failed to resolve import "x" from "src/App.jsx". Does the file exist?
Vite couldn’t find an imported file or package.
TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'.
You imported a named export that the module doesn't export.
Swift: Cannot convert value of type 'X' to expected argument type 'Y'
The value’s type doesn’t match what the function or property expects.
Rust: error[E0308]: mismatched types — expected `X`, found `Y`
A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…
TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor
With strictPropertyInitialization on, a class property declared without ? or a default isn’t set in the constructor.
ReferenceError: x is not defined
Code refers to a variable or function name that doesn’t exist in the current scope.
TypeScript: error TS2300: Duplicate identifier 'Foo'.
The same name is declared twice in the same scope (or in merged global declarations).
TypeScript: error TS2688: Cannot find type definition file for 'node'.
`types` in tsconfig (or auto-included `@types/*`) refers to a package that isn't installed.
TypeScript: error TS2551: Property 'lenght' does not exist on type 'string'. Did you mean 'length'?
A property name is misspelled (TypeScript suggests the closest valid one).
TypeScript: error TS2571: Object is of type 'unknown'.
You used a value typed `unknown` (often `catch (e)` or `JSON.parse` result) without narrowing.
TypeScript: error TS2503: Cannot find namespace 'JSX'. / Cannot find namespace 'NodeJS'
Code references a global namespace (JSX, NodeJS, Express) that isn't declared — missing `@types` or lib settings.
AttributeError: 'X' object has no attribute 'y'
You accessed an attribute or method that doesn’t exist on that object type.
Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type int, string given
A function received a value of the wrong type for a typed parameter.
Warning: Array to string conversion
An array was used where a string is expected — echoing it, concatenating it, or passing it to a string function.
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.
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.
Error: @prisma/client did not initialize yet. Please run "prisma generate"
The generated Prisma Client is missing or out of date.
Error: Node Sass does not yet support your current environment
node-sass (deprecated) has no binary for your Node version/OS.
Next.js 15: Route "/x" used `cookies().get('token')`. `cookies()` should be awaited before using its value
Since Next.js 15, cookies(), headers(), params and searchParams are async — they must be awaited.
Next.js 15: Route "/search" used `searchParams.q`. `searchParams` should be awaited
Page props `searchParams` are a Promise in Next.js 15 and must be awaited.
Next.js: useSearchParams() should be wrapped in a suspense boundary at page "/". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
A Client Component using `useSearchParams` is statically rendered, so the build needs a Suspense boundary for the client-only par…
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.
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.
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).
Map another error
Popular: 500403400ORA-009331064Critical errorFileNotFoundException assemblyTypeError