monaco-languageclient
monaco-languageclient copied to clipboard
onDidChangeConfiguration is not a function error in both `wrapper-react` and standard use.
I'm receiving a very similar error to #686:
contextKeyService.js:82 Uncaught (in promise) TypeError: this._configurationService.onDidChangeConfiguration is not a function
at new ConfigAwareContextValuesContainer (contextKeyService.js:82:1)
at new ContextKeyService (contextKeyService.js:314:1)
at InstantiationService._createInstance (instantiationService.js:120:1)
at InstantiationService._createServiceInstance (instantiationService.js:224:1)
at InstantiationService._createServiceInstanceWithOwner (instantiationService.js:212:1)
at InstantiationService._createAndCacheServiceInstance (instantiationService.js:203:1)
at InstantiationService._safeCreateAndCacheServiceInstance (instantiationService.js:161:1)
at InstantiationService._getOrCreateServiceInstance (instantiationService.js:147:1)
at Object.get (instantiationService.js:70:1)
at lifecycle.js:38:1
ConfigAwareContextValuesContainer @ contextKeyService.js:82
ContextKeyService @ contextKeyService.js:314
_createInstance @ instantiationService.js:120
_createServiceInstance @ instantiationService.js:224
_createServiceInstanceWithOwner @ instantiationService.js:212
_createAndCacheServiceInstance @ instantiationService.js:203
_safeCreateAndCacheServiceInstance @ instantiationService.js:161
_getOrCreateServiceInstance @ instantiationService.js:147
get @ instantiationService.js:70
(anonymous) @ lifecycle.js:38
invokeFunction @ instantiationService.js:77
startup @ lifecycle.js:36
await in startup (async)
commitLayoutEffectOnFiber @ react-dom.development.js:23344
commitLayoutMountEffects_complete @ react-dom.development.js:24727
commitLayoutEffects_begin @ react-dom.development.js:24712
commitLayoutEffects @ react-dom.development.js:24651
commitRootImpl @ react-dom.development.js:26862
commitRoot @ react-dom.development.js:26721
finishConcurrentRender @ react-dom.development.js:26020
performConcurrentWorkOnRoot @ react-dom.development.js:25848
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
Same error occurs when using the wrapper-react
as well as a more general approach:
const wrapper = new MonacoEditorLanguageClientWrapper();
await wrapper.init(getMonacoWrapperConfig());
Turning off HMR and liveReload results in the same error.
It's possible that this error is related to the bundler I'm using (rsbuild/rspack), but I've been able to get regular Monaco Editor working mostly out of the box.
I've create a test repro repo. Should just be able to npm install, npm run dev
to see the error.