When working with Nuxtjs, I encountered an issue regarding my permissionKeys on the page and checking user access in the middleware. Everything runs smoothly when my script language is set to js, but errors arise when set to lang="ts".
I tried to find a solution by using the vue-meta package, but unfortunately, I kept running into the same error.
<script lang="ts">
export default {
meta: {
authorization: ['Organization/List']
},
data() {
return {
text: this.$t('organization.title'),
}
}
}
As a result, I keep receiving this error message: "Property '$t' does not exist on type '{ meta: { authorization: string[]; }; data(): any; }'."
The issue seems to revolve around utilizing meta and global variables together, which remains unresolved for me at this time.