nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.

Home Page:https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'aliases')

Sass2221 opened this issue · comments

version nuxt-icon: 0.6.0 (last update)
version nuxt: 3.8.0

I'm getting this error: Cannot read properties of undefined (reading 'aliases')
I rolled back 0.5.0 version. and it worked. don`t bugs

just wasted an hour trying to find this....workaround is to make an app.config.ts with nuxtIcon: {}

Cause is here: https://github.com/nuxt-modules/icon/blob/7d9bcf31359ce0a3941f29ea596e63e7a34dc14d/src/runtime/Icon.vue#L32

meet a same problem

Solution for now - Create a new file app.config.ts in the root, add

export default defineAppConfig({
  nuxtIcon: {},
})

@notflip
Thanks, this solution working !