Got error when initialize Moonbit Server


This may be because of using the not compatible api of high version nodejs

What’s your node version?

My node version is v18.14.0

This might be related to other problems.

Would you mind providing more information?

  1. Run moon version --all in terminal
  2. execute moonbit: get extension's compiler version in vscode. Make sure its version is the same as moonc’s version

For example, In my laptop, those two give me:

$ moon version --all
moon 0.1.0 (2034cc4 2024-02-18) ~/.moon/bin/moon
moonc ab45a63 2024-02-19 ~/.moon/bin/moonc

and

Also If you are in a moon module (there is a moon.mod.json file and target folder in project), make sure to run moon clean after upgrade moon, since older version’s build artifact might cause language server crashing.