this._configurationService.onDidChangeConfiguration is not a function #685
-
Hello 👋, I'm trying to use the monaco wrapper inside a nuxt.js component. Sadly, I get an error:
Strangely, this error goes away if I hot refresh the component and monaco starts. Here's my code: <script lang="ts" setup>
import {
MonacoEditorLanguageClientWrapper,
type UserConfig,
} from "monaco-editor-wrapper"
const props = defineProps<{
userConfig: UserConfig
}>()
const emit = defineEmits<{
(e: "update:modelValue", changes: string): void
(e: "load", wrapper: MonacoEditorLanguageClientWrapper): void
(e: "error", error: any): void
}>()
const monacoRef = ref<HTMLDivElement>()
const wrapper = new MonacoEditorLanguageClientWrapper()
await wrapper.init(props.userConfig)
watch(monacoRef, async () => {
if (monacoRef.value) {
await wrapper.start(monacoRef.value)
}
})
onUnmounted(() => wrapper.dispose())
</script>
<template>
<div ref="monacoRef" />
</template> I've been searching for a few hours without success... Please help me |
Beta Was this translation helpful? Give feedback.
Answered by
metehansenol
Jun 28, 2024
Replies: 1 comment 1 reply
-
It's about version compatibility check here versions you're using |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Mw3y
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's about version compatibility check here versions you're using
https://github.com/TypeFox/monaco-languageclient/blob/main/packages/wrapper-react/CHANGELOG.md