monaco-languageclient: upgrading to monaco-languageclient version 6 throws command failed error

Hi there,

I’m currently using monaco-languageclient version v5, when I’m upgrading it to v6, it throws command failed error.

it says

error /Users/xxxxx/xxxxxxx/node_modules/monaco-languageclient: Command failed.
Exit code: 127
Command: monaco-treemending
Arguments:

I have added the postinstall prop under package.json with value monaco-treemending and also tried manually run npx monaco-treemending, it prints Monaco-editor was tree-mended.

however, when I run yarn upgrade monaco-languageclient, it prints the above command failed error.

any ideas how to solve ?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 28

Most upvoted comments

@kaisalmen

all good, thank you for the support and knowledge sharing.

I will be looking forward to the next release !

have a great weekend!

Hi @kaisalmen

the v6.1.0-next.1 is promising, I am able to build it with some minor code changes on my end. I’m logging my changes here in case it helps you folks for additional improvements or for anyone else to see if needed.

  • after upgrading to v6.1.0-next.1 with yarn, it initially complains about mp3 files, and wasm files missing loader, so I added the corresponding loader in my webpack config.
  • after fixing the loader problem above, it starts complaining about two packages still missing. they are: vscode-textmate vscode-oniguruma, so I manually added by executing yarn add vscode-textmate vscode-oniguruma -D
  • did one more build, and now I can see it successfully built.
  • when I tried the actual page that has the editor with latest built resources, it starts to complain the MonacoServices obj under LanguageClientLib is undefined, and then I did some research and realized that I should probably switch to initServices, instead of calling MonacoServices.get(); and MonacoServices.install()
  • after the above all procedures, I am able to initialize the editor, and initialize the language server connection. however, I still see some error in my console when it tries to connect to my Java and C# language server. (C, C++, Python etc seems to be running perfectly.) although those errors are printing in my console, all the language server functions are all performing expectedly though.

appreciate any sight, regarding to those error messages.

Thanks!

Screenshot 2023-06-06 at 3 34 15 PM

My guess is the patch wasn’t applied

@kaisalmen got it, I will wait, i will use the old version for now. Thanks for the heads up @kaisalmen