-
-
Notifications
You must be signed in to change notification settings - Fork 200
Cannot read property 'addCommand' of undefined #244
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
Comments
The last version of monaco-languageclient is not compatible with the last version of monaco-editor. You need to use the 'next' version (and the usage changed, see the changelog) |
Great, that works! FYI for anyone else struggling with this, I upgraded to // @ts-ignore
MonacoServices.install(require('monaco-editor-core/esm/vs/platform/commands/common/commands').CommandsRegistry); Thanks for the quick reply @CGNonofr |
@palkerecsenyi Hi, Will you be able to share the code of this -- import { editor } from 'monaco-editor';
|
I'm trying to set up a language server with
gopls
on the backend, and a React app on the frontend.I get this error the moment the editor loads:
Interestingly, it works perfectly fine with
bash-language-server
andpyls
, so it's only Go that's causing this error.I've established that it's probably not being caused by
gopls
itself, and is most likely an issue withmonaco-languageclient
: golang/go#43420Here are all the relevant versions I'm using:
Here's my code:
View frontend code
View backend code
Thanks in advance!
The text was updated successfully, but these errors were encountered: