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

Fix node v22+ InternalModuleStat Assertion failed error #109

Open
jcandan opened this issue Jan 26, 2025 · 1 comment
Open

Fix node v22+ InternalModuleStat Assertion failed error #109

jcandan opened this issue Jan 26, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jcandan
Copy link

jcandan commented Jan 26, 2025

Describe the bug

Getting an error running any coderoad command on a fresh install.

  #  node[29033]: void node::fs::InternalModuleStat(const v8::FunctionCallbackInfo<v8::Value>&) at ../src/node_file.cc:1046
  #  Assertion failed: (args.Length()) >= (2)

----- Native stack trace -----

 1: 0x102d8f7 node::Assert(node::AssertionInfo const&) [node]
 2: 0x10368d7  [node]
 3: 0x7fcbcfe0f186 

----- JavaScript stack trace -----

1: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:34535
2: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:34176
3: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:34506
4: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:173374
5: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:173420
6: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:173521
7: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:258942
8: /home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:261569
9: e (/home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:262673)
10: get (/home/jcandan/.nvm/versions/node/v23.6.1/lib/node_modules/@coderoad/cli/node_modules/esm/esm.js:1:262740)


Aborted (core dumped)

To Reproduce

sudo apt update
sudo apt install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install node
node --version
npm install -g @coderoad/cli
coderoad --version
coderoad --help

Expected behavior
I expect the help text or version to be shown.

Screenshots
N/A

Desktop (please complete the following information):

  • Platfrom: Windows 11 Version 23H2 (OS Build 22631.2861)
  • OS: Ubuntu via WSL2
  • Version 24.04.1

Node (please complete the following information):

  • Version v23.6.1

Git (please complete the following information):

  • Version 2.43.0

Additional context
N/A

@jcandan jcandan added the bug Something isn't working label Jan 26, 2025
@jcandan
Copy link
Author

jcandan commented Jan 26, 2025

Good news.

I was able to drop to Node v20 and reinstall coderoad, and it is working.

I additionally identified support for Node v18. But it seems this error occurs starting in Node v22.

$ nvm install 18
Now using node v18.20.6 (npm v10.8.2)
$ npm install -g @coderoad/cli
$ coderoad --version
v0.9.3
$
$ nvm install 20
Now using node v20.18.2 (npm v10.8.2)
$ npm install -g @coderoad/cli
$ coderoad --version
v0.9.3
$
$ nvm install 22
Now using node v22.13.1 (npm v10.9.2)
$ npm install -g @coderoad/cli

  #  node[34002]: void node::fs::InternalModuleStat(const v8::FunctionCallbackInfo<v8::Value>&) at ../src/node_file.cc:1039
  #  Assertion failed: (args.Length()) >= (2)

Security Support Ends in 1 year and 3 months (30 Apr 2026).

Image

@jcandan jcandan changed the title Fix node InternalModuleStat Assertion failed error Fix node v22+ InternalModuleStat Assertion failed error Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants