Search code examples
typescriptvuejs3primevue

Uncaught TypeError: Cannot read properties of undefined (reading 'config')


I'm using Vue 3-Typescript and primevue I recently added primevue to my application and I received the error and warnings below. I am trying to use the primevue 'Menubar' component when I get the error. When I use the megamenu component, the error is gone. I've been looking at this and trying different things for an hour and can't figure out what I'm missing. Here's the vue component file in my repo. Here's the main.ts file also. Any help would be much appreciated.

enter image description here


Solution

  • You should use use before mount

    app.use(PrimeVue);
    app.mount('#app');