highlightjs / highlightjs-vue

highlight.js syntax definition for Vue.js
BSD 3-Clause "New" or "Revised" License
15 stars 6 forks source link

TypeError: Cannot read properties of null (reading 'isCE') possible Vue version mismatch #14

Closed mikinty closed 7 months ago

mikinty commented 7 months ago

I have tried Vue 3.3 and 3.4, and it seems that no matter what I do, including all of the remedies here with deduping: https://github.com/vuejs/core/issues/4344

I cannot solve this error. I wonder if this is just an artifact of this package being too old, and using an older version of Vue?

I am using this setup:

import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import hljsVuePlugin from "@highlightjs/vue-plugin";

hljs.registerLanguage('javascript', javascript);

const app = createApp(App)
app.use(hljsVuePlugin)
app.mount('#app')

and I keep getting this error

@sipec_vue3-tags-input.js?v=a16ebd63:28462 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isCE')
    at renderSlot (@sipec_vue3-tags-input.js?v=a16ebd63:28462:36)
    at Proxy.<anonymous> (@sipec_vue3-tags-input.js?v=a16ebd63:35541:152)
    at renderComponentRoot (chunk-CVAS345M.js?v=be1d87f2:2301:17)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-CVAS345M.js?v=be1d87f2:7273:46)
    at ReactiveEffect.run (chunk-CVAS345M.js?v=be1d87f2:419:19)
    at instance.update (chunk-CVAS345M.js?v=be1d87f2:7401:17)
    at setupRenderEffect (chunk-CVAS345M.js?v=be1d87f2:7411:5)
    at mountComponent (chunk-CVAS345M.js?v=be1d87f2:7186:7)
    at processComponent (chunk-CVAS345M.js?v=be1d87f2:7140:9)
    at patch (chunk-CVAS345M.js?v=be1d87f2:6635:11)

I can probably provide a min repro at some point, but just wondering if there is something funky about this way this package is configured, which is why I'm running into these issues.

mikinty commented 7 months ago

ok my bad I think it's something with 3.4 and it's not specifically related to this package