#2037·async

async 3.2.6 ERR_INTERNAL_ASSERTION Unexpected module status 3 with node 22 / 24

Author: dlantsCreated Jul 15, 2025Updated Mar 5, 2026
node:internal/assert:17
  throw new ERR_INTERNAL_ASSERTION(message);
        ^

Error [ERR_INTERNAL_ASSERTION]: Unexpected module status 3.
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at assert.fail (node:internal/assert:17:9)
    at ModuleJob.runSync (node:internal/modules/esm/module_job:345:12)
    at require (node:internal/modules/esm/translators:151:9)
    at Object.<anonymous> (/home/ubuntu/.local/share/nvim/lazy/magenta.nvim/node_modules/async/asyncify.js:16:18)
    at loadCJSModule (node:internal/modules/esm/translators:166:3)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:208:7)
    at ModuleJob.runSync (node:internal/modules/esm/module_job:337:39)
    at require (node:internal/modules/esm/translators:151:9)
    at Object.<anonymous> (/home/ubuntu/.local/share/nvim/lazy/magenta.nvim/node_modules/async/internal/wrapAsync.js:8:17)
    at loadCJSModule (node:internal/modules/esm/translators:166:3) {
  code: 'ERR_INTERNAL_ASSERTION'
}

The error ERR_INTERNAL_ASSERTION: Unexpected module status 3 occurs when using ESM modules with certain CommonJS packages in newer Node.js versions.

See https://github.com/dlants/magenta.nvim/issues/146#issuecomment-3073881051 for details

For now it seems like fixing this requires downgrading winston to 3.2.5