Skip to content

Fix node v22+ InternalModuleStat Assertion failed error #109

Open
@jcandan

Description

@jcandan

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

Activity

jcandan

jcandan commented on Jan 26, 2025

@jcandan
Author

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

changed the title [-]Fix node InternalModuleStat Assertion failed error[/-] [+]Fix node v22+ InternalModuleStat Assertion failed error[/+] on Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Fix node v22+ InternalModuleStat Assertion failed error · Issue #109 · coderoad/coderoad-cli