I am using [email protected] and [email protected]
Main script
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import PrimeVue from 'primevue/config';
import './assets/main.css'
// primevue-css
import "primevue/resources/themes/lara-light-indigo/theme.css";
import "primevue/resources/primevue.min.css";
import 'primeicons/primeicons.css';
import '/node_modules/primeflex/primeflex.css';
const app = createApp(App)
app.use(router, PrimeVue)
app.mount('#app')
Home page content
<script setup>
import { ref } from "vue";
// components
import Button from 'primevue/button';
import Dialog from 'primevue/dialog';
// function
const visible = ref(false);
</script>
<template>
<section class="about">
<div class="wrapper">
<h1>This is a home page</h1>
<br/>
<div class="btn-wrapper">
<Button label="Show" icon="pi pi-external-link" @click="visible = true" />
</div>
</div>
</section>
<Dialog v-model:visible="visible" modal header="Header" :style="{ width: '50vw' }">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</Dialog>
</template>
An error message "Uncaught (in promise) TypeError: can't access property "config", this.$primevue is undefined" is displayed when clicking the button to show the dialog.
I have searched for solutions and it seems to be related to an issue with the node module, even after re-installing multiple times. Is there a known resolution for this problem? The button continues to render despite the error.