Currently, my main technologies are Nuxtjs and Nuxt-property-decorator
To prevent repeating a certain method, I created a mixin
This method requires the use of a component (Alert component)
In order to use the component in the mixin, I imported it
However, I encountered an error while importing the component
Note: I have double-checked that the import address is correct
mixin/logOut.ts import Vue from 'vue'
import { Component } from 'nuxt-property-decorator'
import AppAlert from '~/components/Common/AppAlert'
@Component
export class LogOut extends Vue {
async LogOut() {
const confirm = await this.$dialog.show({
component: AppAlert,
props: {
title: { text: 'Exit ?', icon: 'exclamation-thick' },
body: 'Exit Connector ?',
btn: { text: 'Confirm', icon: 'power', color: 'error' }
}
})
if (confirm) {
this.$auth.logout()
}
}
}
https://i.sstatic.net/yjbVX.png
The error message states:
Cannot find module '~/components/Common/AppAlert' or its corresponding type declarations.ts(2307)