Engineering Tools for AI

Программирование

Как читать сообщения об ошибках

Практический справочник по поиску причины, файла, строки, предупреждений и настоящих ошибок в логах.

31 пунктов

Структура сообщения

First error line

First error line

TypeError: Cannot read properties of undefined

Значение

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

Как читать

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

Пример

TypeError: Cannot read properties of undefined

Пример запроса

Find the first real error line in this log.

Структура сообщения

Error name

Error name

SyntaxError, TypeError, ReferenceError

Значение

The error name tells you the broad class of problem.

Как читать

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

Пример

SyntaxError, TypeError, ReferenceError

Пример запроса

Classify this error by error name before suggesting a fix.

Структура сообщения

Error message

Error message

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

Значение

The message explains what the tool could not do.

Как читать

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

Пример

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

Пример запроса

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

Структура сообщения

Stack trace

Stack trace

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

Значение

A list of function calls that led to the error.

Как читать

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

Заметка

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

Пример

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

Пример запроса

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

Подсказки места

File path

File path

src/components/LanguageSwitcher.tsx

Значение

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

Как читать

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

Пример

src/components/LanguageSwitcher.tsx

Пример запроса

List the project files mentioned by this error.

Подсказки места

Line and column

Line and column

src/app/page.tsx:27:12

Значение

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

Как читать

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

Пример

src/app/page.tsx:27:12

Пример запроса

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

Подсказки места

Project file line

Project file line

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

Значение

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

Как читать

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

Пример

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

Пример запроса

Separate my project file lines from framework lines.

Подсказки места

node_modules line

node_modules line

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

Значение

A line inside an installed dependency or framework package.

Как читать

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

Заметка

Do not edit node_modules as a normal fix.

Пример

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

Пример запроса

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

JavaScript runtime

SyntaxError

SyntaxError

SyntaxError: Unexpected token '}'

Значение

JavaScript or TypeScript could not parse the code.

Как читать

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

Пример

SyntaxError: Unexpected token '}'

Пример запроса

Find the syntax problem around this line.

JavaScript runtime

TypeError

TypeError

TypeError: Cannot read properties of undefined

Значение

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

Как читать

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

Пример

TypeError: Cannot read properties of undefined

Пример запроса

Trace where this undefined value comes from.

JavaScript runtime

ReferenceError

ReferenceError

ReferenceError: copy is not defined

Значение

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

Как читать

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

Пример

ReferenceError: copy is not defined

Пример запроса

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

Значение

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

Как читать

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

Пример

Cannot read properties of undefined (reading 'navLabel')

Пример запроса

Identify which value is undefined in this error.

JavaScript runtime

is not a function

is not a function

setOpenMenu is not a function

Значение

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

Как читать

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

Пример

setOpenMenu is not a function

Пример запроса

Find why this value is being called as a function.

Next.js и web

Module not found

Module not found

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

Значение

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

Как читать

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

Пример

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

Пример запроса

Check the import path and the actual file path.

Next.js и web

Export not found

Export not found

Export errorMessageGuideCopy doesn't exist in target module

Значение

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

Как читать

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

Пример

Export errorMessageGuideCopy doesn't exist in target module

Пример запроса

Find the mismatched import or export name.

Next.js и web

Hydration failed

Hydration failed

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

Значение

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

Как читать

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

Пример

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

Пример запроса

Find the likely server and client render mismatch.

Next.js и web

404 Not Found

404 Not Found

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

Значение

The requested route or file could not be found.

Как читать

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

Пример

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

Пример запроса

Check why this route returns 404.

Next.js и web

500 Internal Server Error

500 Internal Server Error

GET /ko 500

Значение

The server received the request but failed while processing it.

Как читать

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

Пример

GET /ko 500

Пример запроса

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

TypeScript и lint

Property does not exist on type

Property does not exist on type

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

Значение

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

Как читать

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

Пример

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

Пример запроса

Explain why TypeScript thinks this property does not exist.

TypeScript и lint

Type is not assignable

Type is not assignable

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

Значение

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

Как читать

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

Пример

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

Пример запроса

Show the actual type and expected type in this error.

TypeScript и lint

ESLint error

ESLint error

React Hook useEffect has a missing dependency

Значение

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

Как читать

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

Пример

React Hook useEffect has a missing dependency

Пример запроса

Explain this lint error and fix it without changing behavior.

Next.js и web

Build failed

Build failed

Failed to compile.

Значение

The production build could not finish.

Как читать

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

Пример

Failed to compile.

Пример запроса

From this build log, identify the first blocking failure.

Терминал и система

EADDRINUSE

EADDRINUSE

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

Значение

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

Как читать

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

Пример

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

Пример запроса

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

Терминал и система

ENOENT

ENOENT

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

Значение

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

Как читать

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

Пример

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

Пример запроса

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

Терминал и система

Permission denied

Permission denied

Operation not permitted

Значение

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

Как читать

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

Заметка

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

Пример

Operation not permitted

Пример запроса

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

Терминал и система

Command not found

Command not found

zsh: command not found: next

Значение

The shell cannot find an executable command with that name.

Как читать

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

Пример

zsh: command not found: next

Пример запроса

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

Порядок отладки

Warning

Warning

DeprecationWarning: module.register() is deprecated

Значение

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

Как читать

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

Пример

DeprecationWarning: module.register() is deprecated

Пример запроса

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

Порядок отладки

DeprecationWarning

DeprecationWarning

DeprecationWarning: module.register() is deprecated

Значение

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

Как читать

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

Пример

DeprecationWarning: module.register() is deprecated

Пример запроса

Tell me whether this DeprecationWarning blocks deployment.

Порядок отладки

Recent change

Recent change

The error started after editing SiteHeader.tsx

Значение

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

Как читать

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

Пример

The error started after editing SiteHeader.tsx

Пример запроса

Compare this error with the files changed most recently.

Порядок отладки

Reproduce step

Reproduce step

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

Значение

The smallest action sequence that makes the error appear again.

Как читать

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

Пример

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

Пример запроса

Turn this description into exact reproduce steps.

Порядок отладки

Minimal log

Minimal log

Error line + file path + stack line from src

Значение

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

Как читать

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

Пример

Error line + file path + stack line from src

Пример запроса

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