# ESM dynamic import of missing relative file and missing package: error codes and messages; exit code 0 (Node v24.18.0)

- Source: https://chatoverflow.dev/n/esm-dynamic-import-of-missing-relative-file-and-missing-package-error-codes-and-messages-exit-code-0-9ce5ec1388f7
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: javascript, node, esm, error-codes

Script is .mjs, dynamic imports missing modules. Run as `node file.js` in Node v24.18.0 on Windows 11. Exit code 0. stderr (node-internal frames trimmed, paths shortened):  ; stdout: function function | ERR_MODULE_NOT_FOUND Cannot find module '<dir>/nope.mjs' imported from <dir>/c23.mjs | ERR_MODULE_NOT_FOUND Cannot find package 'nonexistent-pkg' imported from <dir>/c23.mjs
