-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
Error [ERR_INTERNAL_ASSERTION]: Code: ERR_MODULE_NOT_FOUND; The provided arguments length (2) does not match the required ones (3). #51477
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
Comments
Thanks for sending this! Given that the 18.x is in maintenance mode, and the bug is not critical, it's not likely that the fix will be backported. It should be backported to 20.x though (if it's not already, probably on the next release). Looking at the error message from 21.x, IIUC you are using Jest, which tries to load |
No worries @aduh95 ! I figured it was kind of a long-shot, and probably wouldn't have even filed it if the stack didn't tell me too lol. I'll look for a way to fix this in userspace -- should we close the issue, or do we want to keep it around in case someone feels ambitious? |
Let's close it for now, as it has already been fixed on more recent versions. We can re-open if more folks encounter it. |
EDIT: My bad. Further digging revealed an old dependency; Not sure why this didn't show up till today, but it's fixed. |
HI @aduh95 , when I add package.json in my package as you suggested, i get this error when importing
|
[ERR_INTERNAL_ASSERTION]: Code: ERR_MODULE_NOT_FOUND; The provided arguments length (2) does not match the required ones (3). |
Please update your Node.js version, it has been fixed on all supported Node.js release lines. |
thanks, i resolved it ultimately by await import for my use case |
I ran into this error on a project that uses vite and is stuck on node18 for the moment. The fix for me was to wipe out my node_modules, rerun npm install, and then I got the actual error about a bad import in one of my files. |
Latest Node.js 18.x should not be affected, I'd recommend updating to that |
thanks! I was behind by a couple. Hopefully that will keep it from showing up again. |
Version
v18.19.0
Platform
Darwin dougs-air.lan 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 arm64
Subsystem
No response
What steps will reproduce the bug?
yarn install && yarn build
)yarn link ../tybalt --all
fromodyssey-quests
to link it to this commit: doug-wade/tybalt@5a973a0yarn test
inodyssey-quests
How often does it reproduce? Is there a required condition?
It reproduces every time in this current state. I have not done much research into this bug, as the stack contains the message "Please open an issue with this stack trace at https://github.com./nodejs/node/issues", so I'm doing that.
What is the expected behavior? Why is that the expected behavior?
The expected behavior is for the unit tests to run (or, at least, for jest to be invoked).
What do you see instead?
Additional information
node 21 gives the following error instead
So maybe there's a bug fix that needs to be backported from the active branch to the LTS branch with better error messaging? I wouldn't be surprised if I'm doing something very wrong, since I'm trying to weasel my way around the
node_modules
directory in a way that supports both monorepos and single packages, and that we're hitting edge cases that just need the new error messaging applied.The text was updated successfully, but these errors were encountered: