Error map

TS6059: File is not under 'rootDir' TypeScript: error TS6059: File '/app/shared/util.ts' is not under 'rootDir' '/app/src'. 'rootDir' is expected to contain all source files.

TypeScript · layer 1, On your device

Open the full error page →

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

TS6059: File is not under 'rootDir' — TypeScript: error TS6059: File '/app/shared/util.ts' is not under 'rootDir' '/app/src'. 'rootDir' is expected to contain all source files. (TypeScript)TS6059: Fil…TS2307 — TS2307: Cannot find module 'x' or its corresponding type declarations. (Node.js)TS2307TS2802: Type can only be iterated through when using the '--downlevelIteration' flag — TypeScript: error TS2802: Type 'Set<string>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher (TypeScript)TS2802: Type can on…TS2688: Cannot find type definition file for 'x' — TypeScript: error TS2688: Cannot find type definition file for 'node'. (TypeScript)TS2688: Cannot find…TS2792: Cannot find module — did you mean to set the 'moduleResolution' option to 'nodenext' — TypeScript: error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? (TypeScript)TS2792: Cannot find…TS5083: Cannot read file tsconfig.json / extends not found — TypeScript: error TS5083: Cannot read file '/app/tsconfig.json'. / error TS6053: File 'tsconfig.base.json' not found (TypeScript)TS5083: Cannot read…TS17004: Cannot use JSX unless the '--jsx' flag is provided — TypeScript: error TS17004: Cannot use JSX unless the '--jsx' flag is provided. (TypeScript)TS17004: Cannot use…TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or 'es2015' or later — TypeScript: error TS5095 (TypeScript)TS5095: Option 'bun…Cannot find module './App.vue' or its corresponding type declarations — TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations. (Vue)Cannot find module …MODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDERR_UNKNOWN_FILE_EXTENSION — TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" (Node.js)ERR_UNKNOWN_FILE_EX…TS7016 — TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type. (Node.js)TS7016TS2304 — TS2304: Cannot find name 'x'. (Node.js)TS2304ERR_INVALID_ARG_TYPE — TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined (Node.js)ERR_INVALID_ARG_TYPETS2339 — TS2339: Property 'x' does not exist on type 'Y'. (Node.js)TS2339TS2345 — TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. (Node.js)TS2345TS2305: Module has no exported member — TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'. (TypeScript)TS2305: Module has …TS2614: Module has no exported member — did you mean to use 'import x from' — TypeScript: error TS2614: Module '"./Button"' has no exported member 'Button'. Did you mean to use 'import Button from "./Button"' instead? (TypeScript)TS2614: Module has …TS1259: Module can only be default-imported using the 'esModuleInterop' flag — TypeScript: error TS1259: Module '"express"' can only be default-imported using the 'esModuleInterop' flag (TypeScript)TS1259: Module can …TS1005: ';' expected / ',' expected (syntax error) — TypeScript: error TS1005: ';' expected. (TypeScript)TS1005: ';' expecte…TS1128: Declaration or statement expected — TypeScript: error TS1128: Declaration or statement expected. (TypeScript)TS1128: Declaration…Objects are not valid as a React child — Error: Objects are not valid as a React child (React)Objects are not val…Nothing was returned from render — Error: Nothing was returned from render. This usually means a return statement is missing. (React)Nothing was returne…Adjacent JSX elements — Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (React)Adjacent JSX elemen…TS1192: Module has no default export — TypeScript: error TS1192: Module '"./utils"' has no default export. (TypeScript)TS1192: Module has …TS1208: File cannot be compiled under '--isolatedModules' because it is considered a global script file — TypeScript: error TS1208: 'index.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement (TypeScript)TS1208: File cannot…TS2532 / TS18048 — TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.) (Node.js)TS2532 / TS18048Type 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…TS2531: Object is possibly 'null' — TypeScript: error TS2531: Object is possibly 'null'. (TypeScript)TS2531: Object is p…

Directly related (8)

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.

TS2802: Type can only be iterated through when using the '--downlevelIteration' flagTypeScript

TypeScript: error TS2802: Type 'Set<string>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher

You iterate a Set/Map/generator with an old compile target (ES5) where `for...of`/spread aren't natively supported.

TS2688: Cannot find type definition file for 'x'TypeScript

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.

TS2792: Cannot find module — did you mean to set the 'moduleResolution' option to 'nodenext'TypeScript

TypeScript: error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?

TypeScript can't resolve a package because `moduleResolution` doesn't match how the package exports (package `exports` map) or pa…

TS5083: Cannot read file tsconfig.json / extends not foundTypeScript

TypeScript: error TS5083: Cannot read file '/app/tsconfig.json'. / error TS6053: File 'tsconfig.base.json' not found

tsc/your IDE can't find or parse the tsconfig (wrong directory, bad `extends`, JSON error).

TS17004: Cannot use JSX unless the '--jsx' flag is providedTypeScript

TypeScript: error TS17004: Cannot use JSX unless the '--jsx' flag is provided.

A `.tsx` file contains JSX but tsconfig has no `jsx` option.

TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or 'es2015' or laterTypeScript

TypeScript: error TS5095

`moduleResolution: "bundler"` needs a compatible `module` setting.

Cannot find module './App.vue' or its corresponding type declarationsVue

TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations.

TypeScript doesn't know what a `.vue` import is without a shim or Volar/`vue-tsc`.

Two steps away (20)

MODULE_NOT_FOUNDNode.js

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.

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.

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.

TS2304Node.js

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.

ERR_INVALID_ARG_TYPENode.js

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.

TS2339Node.js

TS2339: Property 'x' does not exist on type 'Y'.

TypeScript’s type for the object doesn’t include that property.

TS2345Node.js

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.

TS2305: Module has no exported memberTypeScript

TypeScript: error TS2305: Module '"./utils"' has no exported member 'helper'.

You imported a named export that the module doesn't export.

TS2614: Module has no exported member — did you mean to use 'import x from'TypeScript

TypeScript: error TS2614: Module '"./Button"' has no exported member 'Button'. Did you mean to use 'import Button from "./Button"' instead?

You used a named import for something that's a default export (or reverse).

TS1259: Module can only be default-imported using the 'esModuleInterop' flagTypeScript

TypeScript: error TS1259: Module '"express"' can only be default-imported using the 'esModuleInterop' flag

You default-import a CommonJS module that uses `export =`, but `esModuleInterop` isn't enabled.

TS1005: ';' expected / ',' expected (syntax error)TypeScript

TypeScript: error TS1005: ';' expected.

The parser hit a syntax error — missing punctuation, mismatched brackets, or an unsupported syntax for your TypeScript version.

TS1128: Declaration or statement expectedTypeScript

TypeScript: error TS1128: Declaration or statement expected.

The parser found a token where a declaration or statement should start — usually stray braces/parentheses or code outside a funct…

Objects are not valid as a React childReact

Error: Objects are not valid as a React child

You tried to render a plain object (or a Promise/Date) directly in JSX; React can only render strings, numbers, elements and arra…

Nothing was returned from renderReact

Error: Nothing was returned from render. This usually means a return statement is missing.

A component returned undefined (React 17 and earlier) — usually a missing return or a return followed by a line break.

Adjacent JSX elementsReact

Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?

A component returns two sibling JSX elements without a single parent.

TS1192: Module has no default exportTypeScript

TypeScript: error TS1192: Module '"./utils"' has no default export.

You used `import x from "./mod"` but the module only has named exports.

TS1208: File cannot be compiled under '--isolatedModules' because it is considered a global script fileTypeScript

TypeScript: error TS1208: 'index.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement

With `isolatedModules`, every file must be a module (have an import or export).

TS2532 / TS18048Node.js

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.

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.

TS2531: Object is possibly 'null'TypeScript

TypeScript: error TS2531: Object is possibly 'null'.

You used a value that can be `null` without checking it first (strictNullChecks).