Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ERR_INTERNAL_ASSERTION: Unexpected module status 3 #58515

Closed
@timokoessler

Description

@timokoessler

Version

v24.1.0

Platform

Darwin MacBook-Pro 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:33 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8122 arm64

Subsystem

module

What steps will reproduce the bug?

Create the following files:

instrument.mjs

import * as mod from "module";mod.registerHooks({  load(url, context, nextLoad) {    return nextLoad(url, context);  },});

util1.js

const test2 = require("./util2");

util2.js

const test1 = require("./util1");

app.js

require("./util1");console.log("Hello from app.js");

Runnode --import ./instrument.mjs app.js

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior? Why is that the expected behavior?

No exception is thrown. It printsHello from app.js.

What do you see instead?

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:314:12)    at require (node:internal/modules/esm/translators:150:9)    at Object.<anonymous> (/Users/timokoessler/Git/nodejs-module-hooks-bug/module-status-3/util2.js:1:15)    at loadCJSModule (node:internal/modules/esm/translators:165:3)    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:207:7)    at ModuleJob.runSync (node:internal/modules/esm/module_job:306:39)    at require (node:internal/modules/esm/translators:150:9)    at Object.<anonymous> (/Users/timokoessler/Git/nodejs-module-hooks-bug/module-status-3/util1.js:1:15)    at loadCJSModule (node:internal/modules/esm/translators:165:3) {  code: 'ERR_INTERNAL_ASSERTION'}Node.js v24.1.0

Additional information

The issue does not occur in Node.js v24.0.1 or v23.11.1. I discovered this issue by importinghono, a popular web framework, while usingregisterHooks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp