Node.jsのエラー一覧と解決方法(20件)
実在のNode.jsエラーメッセージを収録。各ページで原因と直し方を日本語で解説しています。
- Error: Cannot find module 'express'
- Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
- SyntaxError: Cannot use import statement outside a module
- Error: listen EADDRINUSE: address already in use :::3000
- FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
- Error: connect ECONNREFUSED 127.0.0.1:5432
- TypeError: fetch is not a function
- npm ERR! code ELIFECYCLE
- Error: spawn npm ENOENT
- RangeError: Maximum call stack size exceeded
- npm ERR! 404 Not Found - GET https://registry.npmjs.org/
- Error: Cannot find module 'node:fs'
- DeprecationWarning: Buffer() is deprecated due to security and usability issues
- Error: write EPIPE
- npm WARN EBADENGINE Unsupported engine
- UnhandledPromiseRejectionWarning: Unhandled promise rejection
- Error: Cannot find module 'dotenv'
- Error: ENOENT: no such file or directory, open '.env'
- TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
- Error: Cannot find module './routes' imported from
エラー文を貼って探すならエラーメッセージ検索ツールが便利です。