Engineering Tools for AI

Programmation

Lire les messages d'erreur

Guide pratique pour trouver la vraie cause, le fichier, la ligne, les avertissements et les erreurs bloquantes dans les logs.

31 éléments

Structure du message

First error line

First error line

TypeError: Cannot read properties of undefined

Sens

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

Comment lire

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

Exemple

TypeError: Cannot read properties of undefined

Exemple de demande

Find the first real error line in this log.

Structure du message

Error name

Error name

SyntaxError, TypeError, ReferenceError

Sens

The error name tells you the broad class of problem.

Comment lire

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

Exemple

SyntaxError, TypeError, ReferenceError

Exemple de demande

Classify this error by error name before suggesting a fix.

Structure du message

Error message

Error message

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

Sens

The message explains what the tool could not do.

Comment lire

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

Exemple

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

Exemple de demande

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

Structure du message

Stack trace

Stack trace

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

Sens

A list of function calls that led to the error.

Comment lire

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.

Exemple

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

Exemple de demande

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

Indices d'emplacement

File path

File path

src/components/LanguageSwitcher.tsx

Sens

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

Comment lire

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

Exemple

src/components/LanguageSwitcher.tsx

Exemple de demande

List the project files mentioned by this error.

Indices d'emplacement

Line and column

Line and column

src/app/page.tsx:27:12

Sens

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

Comment lire

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

Exemple

src/app/page.tsx:27:12

Exemple de demande

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

Indices d'emplacement

Project file line

Project file line

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

Separate my project file lines from framework lines.

Indices d'emplacement

node_modules line

node_modules line

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

Sens

A line inside an installed dependency or framework package.

Comment lire

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.

Exemple

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

Exemple de demande

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

Runtime JavaScript

SyntaxError

SyntaxError

SyntaxError: Unexpected token '}'

Sens

JavaScript or TypeScript could not parse the code.

Comment lire

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

Exemple

SyntaxError: Unexpected token '}'

Exemple de demande

Find the syntax problem around this line.

Runtime JavaScript

TypeError

TypeError

TypeError: Cannot read properties of undefined

Sens

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

Comment lire

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

Exemple

TypeError: Cannot read properties of undefined

Exemple de demande

Trace where this undefined value comes from.

Runtime JavaScript

ReferenceError

ReferenceError

ReferenceError: copy is not defined

Sens

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

Comment lire

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

Exemple

ReferenceError: copy is not defined

Exemple de demande

Find why this name is not defined.

Runtime JavaScript

Cannot read properties of undefined

Cannot read properties of undefined

Cannot read properties of undefined (reading 'navLabel')

Sens

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

Comment lire

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

Exemple

Cannot read properties of undefined (reading 'navLabel')

Exemple de demande

Identify which value is undefined in this error.

Runtime JavaScript

is not a function

is not a function

setOpenMenu is not a function

Sens

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

Comment lire

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

Exemple

setOpenMenu is not a function

Exemple de demande

Find why this value is being called as a function.

Next.js et web

Module not found

Module not found

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

Check the import path and the actual file path.

Next.js et web

Export not found

Export not found

Export errorMessageGuideCopy doesn't exist in target module

Sens

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

Comment lire

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

Exemple

Export errorMessageGuideCopy doesn't exist in target module

Exemple de demande

Find the mismatched import or export name.

Next.js et web

Hydration failed

Hydration failed

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

Find the likely server and client render mismatch.

Next.js et web

404 Not Found

404 Not Found

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

Sens

The requested route or file could not be found.

Comment lire

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

Exemple

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

Exemple de demande

Check why this route returns 404.

Next.js et web

500 Internal Server Error

500 Internal Server Error

GET /ko 500

Sens

The server received the request but failed while processing it.

Comment lire

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

Exemple

GET /ko 500

Exemple de demande

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

TypeScript et lint

Property does not exist on type

Property does not exist on type

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

Explain why TypeScript thinks this property does not exist.

TypeScript et lint

Type is not assignable

Type is not assignable

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

Show the actual type and expected type in this error.

TypeScript et lint

ESLint error

ESLint error

React Hook useEffect has a missing dependency

Sens

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

Comment lire

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

Exemple

React Hook useEffect has a missing dependency

Exemple de demande

Explain this lint error and fix it without changing behavior.

Next.js et web

Build failed

Build failed

Failed to compile.

Sens

The production build could not finish.

Comment lire

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

Exemple

Failed to compile.

Exemple de demande

From this build log, identify the first blocking failure.

Terminal et système

EADDRINUSE

EADDRINUSE

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

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

Terminal et système

ENOENT

ENOENT

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

Sens

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

Comment lire

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

Exemple

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

Exemple de demande

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

Terminal et système

Permission denied

Permission denied

Operation not permitted

Sens

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

Comment lire

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.

Exemple

Operation not permitted

Exemple de demande

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

Terminal et système

Command not found

Command not found

zsh: command not found: next

Sens

The shell cannot find an executable command with that name.

Comment lire

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

Exemple

zsh: command not found: next

Exemple de demande

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

Ordre de débogage

Warning

Warning

DeprecationWarning: module.register() is deprecated

Sens

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

Comment lire

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

Exemple

DeprecationWarning: module.register() is deprecated

Exemple de demande

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

Ordre de débogage

DeprecationWarning

DeprecationWarning

DeprecationWarning: module.register() is deprecated

Sens

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

Comment lire

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

Exemple

DeprecationWarning: module.register() is deprecated

Exemple de demande

Tell me whether this DeprecationWarning blocks deployment.

Ordre de débogage

Recent change

Recent change

The error started after editing SiteHeader.tsx

Sens

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

Comment lire

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

Exemple

The error started after editing SiteHeader.tsx

Exemple de demande

Compare this error with the files changed most recently.

Ordre de débogage

Reproduce step

Reproduce step

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

Sens

The smallest action sequence that makes the error appear again.

Comment lire

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

Exemple

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

Exemple de demande

Turn this description into exact reproduce steps.

Ordre de débogage

Minimal log

Minimal log

Error line + file path + stack line from src

Sens

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

Comment lire

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

Exemple

Error line + file path + stack line from src

Exemple de demande

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