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

error TS2339: Property 'aliases' does not exist on type '{}' #86

Closed some-user123 closed 1 month ago

some-user123 commented 1 year ago

Details in this (closed) issue: https://github.com/nuxt-modules/icon/issues/62

ennioVisco commented 1 year ago

Details in this (closed) issue: #62

Re-emerged in nuxt@3.6.1.

stephiescastle commented 11 months ago

Anyone know a workaround for this other than disabling typecheck?

Me-Phew commented 11 months ago

One workaround could be to add this to the app.config.ts

nuxtIcon: { aliases: undefined, class: undefined, size: undefined, },

jamesray commented 11 months ago

@Atinux any updates on this issue? We're using nuxt-icon in production and this is something we're hoping to not need to create a workaround for.

stephiescastle commented 11 months ago

One workaround could be to add this to the app.config.ts

nuxtIcon: { aliases: undefined, class: undefined, size: undefined, },

Thanks @Me-Phew! This worked as a temporary fix and allows us to keep typeCheck enabled for everything else.

Me-Phew commented 11 months ago

Are you also getting this error?

zllvm commented 11 months ago

Are you also getting this error?

You could add index.d.ts to temporarily solve it as it is mentioned in pull#63 by luke-z:

// workaround for https://github.com/nuxt-modules/icon/pull/63
import * as _nuxt_schema from '@nuxt/schema'

interface NuxtIconModuleOptions {
  size?: string | false
  class?: string
  aliases?: { [alias: string]: string }
}

declare module '@nuxt/schema' {
  interface AppConfig {
    nuxtIcon?: NuxtIconModuleOptions
  }
}
Me-Phew commented 11 months ago

Are you also getting this error?

You could add index.d.ts to temporarily solve it as it is mentioned in pull#63 by luke-z:

// workaround for https://github.com/nuxt-modules/icon/pull/63
import * as _nuxt_schema from '@nuxt/schema'

interface NuxtIconModuleOptions {
  size?: string | false
  class?: string
  aliases?: { [alias: string]: string }
}

declare module '@nuxt/schema' {
  interface AppConfig {
    nuxtIcon?: NuxtIconModuleOptions
  }
}

It works, thanks!

gaomingzhao666 commented 1 month ago

Are you also getting this error?

You could add index.d.ts to temporarily solve it as it is mentioned in pull#63 by luke-z:

// workaround for https://github.com/nuxt-modules/icon/pull/63
import * as _nuxt_schema from '@nuxt/schema'

interface NuxtIconModuleOptions {
  size?: string | false
  class?: string
  aliases?: { [alias: string]: string }
}

declare module '@nuxt/schema' {
  interface AppConfig {
    nuxtIcon?: NuxtIconModuleOptions
  }
}

It still works in may 2024, at the meantime this error is still here when project is building

antfu commented 1 month ago

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required

some-user123 commented 1 month ago

Is this sufficient? https://github.com/mandragora-hub/nuxt-icon-repro-build-bug