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 実行エラー

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 実行エラー

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 実行エラー

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 実行エラー

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 実行エラー

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.