nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.
https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue
MIT License
868 stars 37 forks source link

After update: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'replace') #100

Closed QaahirStewart closed 8 months ago

QaahirStewart commented 10 months ago

After update getting this error with icons failing to load. Found where error is coming from. Fixed when removing ":.replace(/^i-/, ''))"

From changelog:

Console error: Icon.vue:25 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'replace') at ReactiveEffect.fn (Icon.vue:25:97) at ReactiveEffect.run (chunk-BVQHDTV7.js:423:19) at get value [as value] (chunk-BVQHDTV7.js:1383:35) at Icon.vue:54:22 at callWithErrorHandling (chunk-BVQHDTV7.js:1565:32) at ReactiveEffect.getter [as fn] (chunk-BVQHDTV7.js:3099:22) at ReactiveEffect.run (chunk-BVQHDTV7.js:423:19) at doWatch (chunk-BVQHDTV7.js:3195:26) at watch (chunk-BVQHDTV7.js:3050:10) at setup (Icon.vue:54:1)

kashalls commented 10 months ago

Seeing this on a clean install, npx nuxi init + npm i nuxt-icon

Martacus commented 8 months ago

I've got the same problem on a clean installation, is there a fix other than the open pr?

Maybe going to an older version?