Engineering Tools for AI

Programming

Error Message Reading Guide

A practical guide for reading error logs, finding the real file and line, separating warnings from failures, and asking for precise debugging help.

31 matching items

Message structure

First error line

First error line

TypeError: Cannot read properties of undefined

Meaning

The first clear error line is often the best starting point.

How to read it

Ignore repeated follow-up logs at first and identify the first line that names the failure.

Example

TypeError: Cannot read properties of undefined

Request example

Find the first real error line in this log.

Message structure

Error name

Error name

SyntaxError, TypeError, ReferenceError

Meaning

The error name tells you the broad class of problem.

How to read it

Use it to separate syntax, runtime, type, network, and environment problems.

Example

SyntaxError, TypeError, ReferenceError

Request example

Classify this error by error name before suggesting a fix.

Message structure

Error message

Error message

Module not found: Can't resolve '@/lib/error-message-guide'

Meaning

The message explains what the tool could not do.

How to read it

Read the verb and object: could not resolve a module, could not read a property, or could not bind a port.

Example

Module not found: Can't resolve '@/lib/error-message-guide'

Request example

Rewrite this error message in plain Korean and point to the likely cause.

Message structure

Stack trace

Stack trace

at SiteHeader (src/components/SiteHeader.tsx:42:15)

Meaning

A list of function calls that led to the error.

How to read it

Find the first line that points to your project file, then inspect that area.

Note

The top stack line is not always your code. Some lines are framework internals.

Example

at SiteHeader (src/components/SiteHeader.tsx:42:15)

Request example

In this stack trace, identify the first line from my project.

Location clues

File path

File path

src/components/LanguageSwitcher.tsx

Meaning

The path tells you which file the tool thinks is involved.

How to read it

Prefer paths under src, app, components, or lib before inspecting dependency folders.

Example

src/components/LanguageSwitcher.tsx

Request example

List the project files mentioned by this error.

Location clues

Line and column

Line and column

src/app/page.tsx:27:12

Meaning

Line and column narrow the location to a specific character area.

How to read it

Inspect the named line plus a few lines above it, because the real cause can start earlier.

Example

src/app/page.tsx:27:12

Request example

Open the file around the reported line and explain what looks wrong.

Location clues

Project file line

Project file line

src/lib/git-github.ts:143:7

Meaning

A stack or build line that points to your source code instead of a dependency.

How to read it

This is usually the line to inspect before reading long framework traces.

Example

src/lib/git-github.ts:143:7

Request example

Separate my project file lines from framework lines.

Location clues

node_modules line

node_modules line

node_modules/next/dist/server/app-render.js

Meaning

A line inside an installed dependency or framework package.

How to read it

Treat it as context unless the log also points to a package version or configuration problem.

Note

Do not edit node_modules as a normal fix.

Example

node_modules/next/dist/server/app-render.js

Request example

Tell me whether this node_modules line is the cause or just context.

JavaScript runtime

SyntaxError

SyntaxError

SyntaxError: Unexpected token '}'

Meaning

JavaScript or TypeScript could not parse the code.

How to read it

Check brackets, quotes, commas, JSX tags, and incomplete expressions near the reported line.

Example

SyntaxError: Unexpected token '}'

Request example

Find the syntax problem around this line.

JavaScript runtime

TypeError

TypeError

TypeError: Cannot read properties of undefined

Meaning

A value did not have the shape or behavior the code expected at runtime.

How to read it

Check whether the value can be undefined, null, a string instead of an object, or a missing function.

Example

TypeError: Cannot read properties of undefined

Request example

Trace where this undefined value comes from.

JavaScript runtime

ReferenceError

ReferenceError

ReferenceError: copy is not defined

Meaning

The code tried to use a variable or function name that is not available in that scope.

How to read it

Check imports, spelling, scope, and whether the variable is declared before use.

Example

ReferenceError: copy is not defined

Request example

Find why this name is not defined.

JavaScript runtime

Cannot read properties of undefined

Cannot read properties of undefined

Cannot read properties of undefined (reading 'navLabel')

Meaning

The code tried to access a property on a value that is undefined.

How to read it

Check the object before the dot, such as copy, locale, params, or a map lookup result.

Example

Cannot read properties of undefined (reading 'navLabel')

Request example

Identify which value is undefined in this error.

JavaScript runtime

is not a function

is not a function

setOpenMenu is not a function

Meaning

The code tried to call something with parentheses, but the value is not a function.

How to read it

Check whether a prop, import, hook result, or object method has the expected name.

Example

setOpenMenu is not a function

Request example

Find why this value is being called as a function.

Next.js and web

Module not found

Module not found

Module not found: Can't resolve '@/lib/error-message-guide'

Meaning

The bundler could not find the file or package named in an import.

How to read it

Check the file exists, the path spelling is exact, and the alias points to the expected folder.

Example

Module not found: Can't resolve '@/lib/error-message-guide'

Request example

Check the import path and the actual file path.

Next.js and web

Export not found

Export not found

Export errorMessageGuideCopy doesn't exist in target module

Meaning

The import name does not match any export from the target file.

How to read it

Compare the imported name with the exact exported const, function, or type name.

Example

Export errorMessageGuideCopy doesn't exist in target module

Request example

Find the mismatched import or export name.

Next.js and web

Hydration failed

Hydration failed

Hydration failed because the server rendered HTML didn't match the client

Meaning

The HTML generated on the server did not match what React rendered in the browser.

How to read it

Check browser-only values, dates, random values, localStorage, and theme state used during initial render.

Example

Hydration failed because the server rendered HTML didn't match the client

Request example

Find the likely server and client render mismatch.

Next.js and web

404 Not Found

404 Not Found

GET /ko/reference/error-message-guide 404

Meaning

The requested route or file could not be found.

How to read it

Check the route folder, generateStaticParams, link href, and exported static output path.

Example

GET /ko/reference/error-message-guide 404

Request example

Check why this route returns 404.

Next.js and web

500 Internal Server Error

500 Internal Server Error

GET /ko 500

Meaning

The server received the request but failed while processing it.

How to read it

Look at the terminal log from the same request, not only the browser status code.

Example

GET /ko 500

Request example

Match this browser 500 with the terminal error that caused it.

TypeScript and lint

Property does not exist on type

Property does not exist on type

Property 'navLabel' does not exist on type 'string'

Meaning

TypeScript says the value's declared type does not include that property.

How to read it

Check whether the value has the correct type, whether it was indexed correctly, and whether the data shape changed.

Example

Property 'navLabel' does not exist on type 'string'

Request example

Explain why TypeScript thinks this property does not exist.

TypeScript and lint

Type is not assignable

Type is not assignable

Type 'string' is not assignable to type 'Locale'

Meaning

A value is being passed somewhere that expects a different type.

How to read it

Compare the actual value type with the expected type named after 'to type'.

Example

Type 'string' is not assignable to type 'Locale'

Request example

Show the actual type and expected type in this error.

TypeScript and lint

ESLint error

ESLint error

React Hook useEffect has a missing dependency

Meaning

A static analysis rule found code that may be unsafe, inconsistent, or against project style.

How to read it

Read the rule name and the file line, then decide whether the code or dependency list should change.

Example

React Hook useEffect has a missing dependency

Request example

Explain this lint error and fix it without changing behavior.

Next.js and web

Build failed

Build failed

Failed to compile.

Meaning

The production build could not finish.

How to read it

Scroll above the summary and find the first compile, type, lint, or route error.

Example

Failed to compile.

Request example

From this build log, identify the first blocking failure.

Terminal and system

EADDRINUSE

EADDRINUSE

Error: listen EADDRINUSE: address already in use :::3001

Meaning

The server tried to use a port that another process is already using.

How to read it

Stop the old server or run the new server on a different port.

Example

Error: listen EADDRINUSE: address already in use :::3001

Request example

Find what is using this port and suggest the safest next step.

Terminal and system

ENOENT

ENOENT

ENOENT: no such file or directory, open 'next.config.js'

Meaning

The process tried to open a file or folder that does not exist at that path.

How to read it

Check the current working directory, filename spelling, extension, and generated files.

Example

ENOENT: no such file or directory, open 'next.config.js'

Request example

Check whether this file is missing or the command is running from the wrong folder.

Terminal and system

Permission denied

Permission denied

Operation not permitted

Meaning

The process does not have permission to read, write, or execute the target.

How to read it

Check sandbox rules, file permissions, protected folders, and whether approval is needed.

Note

Do not fix permission errors by broadly changing permissions unless you understand the target.

Example

Operation not permitted

Request example

Explain why this permission error happened and what approval is needed.

Terminal and system

Command not found

Command not found

zsh: command not found: next

Meaning

The shell cannot find an executable command with that name.

How to read it

Check whether dependencies are installed, whether npm scripts should be used, and whether PATH is set.

Example

zsh: command not found: next

Request example

Tell me whether I should run an npm script instead of this command.

Debugging order

Warning

Warning

DeprecationWarning: module.register() is deprecated

Meaning

A warning says something may need attention, but it may not stop the current command.

How to read it

Check whether the command still completed successfully before treating the warning as a failure.

Example

DeprecationWarning: module.register() is deprecated

Request example

Separate blocking errors from non-blocking warnings in this output.

Debugging order

DeprecationWarning

DeprecationWarning

DeprecationWarning: module.register() is deprecated

Meaning

A feature still works now but is planned to be replaced or removed later.

How to read it

If build passes, record it as a follow-up unless it points to your code or a required upgrade.

Example

DeprecationWarning: module.register() is deprecated

Request example

Tell me whether this DeprecationWarning blocks deployment.

Debugging order

Recent change

Recent change

The error started after editing SiteHeader.tsx

Meaning

The most recent related edit is often the highest-value clue.

How to read it

Compare the error location with files modified in the current task.

Example

The error started after editing SiteHeader.tsx

Request example

Compare this error with the files changed most recently.

Debugging order

Reproduce step

Reproduce step

Open /ko, click the language menu, then click the site menu

Meaning

The smallest action sequence that makes the error appear again.

How to read it

Clear reproduce steps make it possible to verify that the fix actually works.

Example

Open /ko, click the language menu, then click the site menu

Request example

Turn this description into exact reproduce steps.

Debugging order

Minimal log

Minimal log

Error line + file path + stack line from src

Meaning

A short set of log lines that preserves the actual failure and location.

How to read it

Keep the first error, the project file path, the command, and the final success or failure summary.

Example

Error line + file path + stack line from src

Request example

Compress this long log into the minimal lines needed for debugging.