Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v18.x ERR_INTERNAL_ASSERTION #55692

Open
k1r0s opened this issue Nov 2, 2024 · 4 comments
Open

v18.x ERR_INTERNAL_ASSERTION #55692

k1r0s opened this issue Nov 2, 2024 · 4 comments
Labels
v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.

Comments

@k1r0s
Copy link

k1r0s commented Nov 2, 2024

Version

v18.20.4

Platform

Linux zigor-schenkervia15pro 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct  2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

create a javascript file.
Create a symbolic link
run it

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

consistently, evertime

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

node works as expected

What do you see instead?

an error

node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_INTERNAL_ASSERTION]: Code: ERR_MODULE_NOT_FOUND; The provided arguments length (2) does not match the required ones (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 new NodeError (node:internal/errors:405:5)
    at assert (node:internal/assert:14:11)
    at getMessage (node:internal/errors:451:5)
    at new NodeError (node:internal/errors:379:21)
    at legacyMainResolve (node:internal/modules/esm/resolve:218:9)
    at packageResolve (node:internal/modules/esm/resolve:903:14)
    at moduleResolve (node:internal/modules/esm/resolve:973:20)
    at defaultResolve (node:internal/modules/esm/resolve:1206:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25) {
  code: 'ERR_INTERNAL_ASSERTION'
}

Node.js v18.20.4

Additional information

No response

@juanarbol
Copy link
Member

Do you have a code snippet that we can rely on?

@RedYetiDev
Copy link
Member

The failing error doesn't provide enough arguments:
https://github.com/nodejs/node/blob/v18.20.4/lib/internal/modules/esm/resolve.js#L218

@RedYetiDev RedYetiDev added the v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. label Nov 2, 2024
@Hamza12700
Copy link

In node version v23.1 it works fine

@aduh95
Copy link
Contributor

aduh95 commented Nov 3, 2024

I cannot reproduce:

$ node --version
v18.20.4
$ ln -s "$PWD/test/fixtures/empty.cjs" ./entry.js
$ node entry.js
$ echo $?
0

It looks like there's some other requirements for the issue to reproduce, which we would need to figure out so the issue can be investigated.

@aduh95 aduh95 changed the title pasting a bug directly from the terminal stdout v18.x ERR_INTERNAL_ASSERTION Nov 3, 2024
aduh95 added a commit that referenced this issue Nov 7, 2024
PR-URL: #55708
Fixes: #55692
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
Projects
None yet
Development

No branches or pull requests

5 participants