Skip to content
Errors
Commands
Flags
Config
Cheat sheets
Changes
Compat
Codes
Compare
Glossary
Search
Ctrl K
Browse
Error Messages
Commands
Flags & Options
Config Reference
Cheat Sheets
Version Changes
Compatibility
Codes & Tables
X vs Y
Glossary
All tools
Home
Tools
Node.js
Runtimes & package managers
Node.js
JavaScript runtime built on V8.
Official documentation
Errors
1
Config
1
Changes
1
Compat
1
Codes
1
Error: Cannot find module '…' in Node.js
Node.js throws Cannot find module when require() or import cannot resolve a path or package. Install the package, fix the relative path or add the extension.
All Node.js error messages
package.json "type": "module": ES modules in Node.js
Setting "type": "module" in package.json makes Node.js load .js files as ES modules: import and export work, require is undefined, and .cjs stays CommonJS.
All Node.js config reference
Node.js 24 to 26: breaking changes and migration
Upgrading from Node.js 24 to 26: Temporal on by default, V8 14.6, Undici 8, fs.F_OK and SlowBuffer removed, legacy _stream modules gone, native addons rebuilt.
All Node.js version changes
Node.js release schedule: LTS and end-of-life dates
Node.js LTS and end-of-life dates in October 2026: 26 becomes active LTS on Oct 28, 24 is in maintenance until April 2028, 22 ends April 2027, 20 has ended.
All Node.js compatibility
Node.js exit codes: 1, 9, 13, 124 and 128+ explained
Node.js exit codes: 1 uncaught exception, 5 fatal V8 error, 9 invalid argument, 13 unsettled top-level await, 124 process timeout, 128+n killed by a signal.
All Node.js codes & tables
Esc