Skip to content

multiplayer tutorial crashes with node v22 and v23. Use v21 as workaround OR make a few changes and don't use -r esm. #1200

Open
@Henddher

Description

@Henddher

FYI

I followed the multiplayer tutorial but npm run serve crashes.

I was able to bypass the crash by using node v21 and v20. I didn't try any older version.


The crash happens in node itself and only when using v23, and v22. @Thomblin posted the crash in esm but the project was archived on Nov 4th, 2024. It will be appropriate to follow up with node folks and the newly assertion added a few months ago here

❯ npm run serve

> [email protected] serve
> node -r esm src/server.js

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

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

 1: 0x104906800 node::Assert(node::AssertionInfo const&) [/Users/henddher/.nvm/versions/node/v23.2.0/bin/node]
 2: 0x1066f1444 node::fs::InternalModuleStat(v8::FunctionCallbackInfo<v8::Value> const&) (.cold.3) [/Users/henddher/.nvm/versions/node/v23.2.0/bin/node]
...
48: 0x1048c4dfc node::Start(int, char**) [/Users/henddher/.nvm/versions/node/v23.2.0/bin/node]
49: 0x182853154 start [/usr/lib/dyld]

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

1: /Users/henddher/Documents/github/bgio-tutorial/node_modules/esm/esm.js:1:34535
2: /Users/henddher/Documents/github/bgio-tutorial/node_modules/esm/esm.js:1:34176
...
9: e (/Users/henddher/Documents/github/bgio-tutorial/node_modules/esm/esm.js:1:262673)
10: get (/Users/henddher/Documents/github/bgio-tutorial/node_modules/esm/esm.js:1:262740)

zsh: abort      npm run serve

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