I'm encountering an issue with Nuxt.js while attempting to implement the vue-fontawesome framework along with the @nuxtjs/fontawesome framework. Here is the specific error message:
[nuxt] [request error] Cannot read properties of undefined (reading 'component')
at $id_c50a96b3 (./.nuxt/dist/server/server.mjs:3239:31)
at async __instantiateModule__ (./.nuxt/dist/server/server.mjs:19193:3)
This snippet shows my code in nuxt.config.ts
:
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
modules: [
'@nuxtjs/fontawesome'
],
fontawesome: {
icons: {
solid: ['faXmark']
}
}
})
Below is the component where I intend to utilize the icon:
<template>
<div :class="props.className">
<font-awesome-icon icon="xmark" />
<slot />
</div>
</template>
Interestingly, this error only surfaces when attempting to load the page, not during the initial execution.