Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error something on nuxt 3.1.0 - ERROR(vue-tsc) Property 'nuxtIcon' does not exist on type 'AppConfig'. #46

Closed
chanthavong opened this issue Jan 25, 2023 · 2 comments · Fixed by #47

Comments

@chanthavong
Copy link

##error message

ERROR(vue-tsc) Property 'nuxtIcon' does not exist on type 'AppConfig'.
const props = defineProps({
name: {
type: String as PropType<keyof AppConfig['nuxtIcon']['aliases'] | (string & {})>,
^^^^^^^^^^
required: true
},

##code

export default defineNuxtConfig({
  srcDir: 'src',
  ssr: false,
  typescript: {
    typeCheck: true
  },
  modules: ['@nuxtjs/tailwindcss', 'nuxt-icon']

})
@Tahul
Copy link
Contributor

Tahul commented Jan 25, 2023

Should be fixed by ^0.2.10 ; could you try it? :)

@Tahul Tahul reopened this Jan 25, 2023
@thorau
Copy link

thorau commented Jan 27, 2023

Error is still occuring on nuxt 3.1.1:

ERROR(vue-tsc)  Property 'nuxtIcon' does not exist on type 'AppConfig'.
 FILE /node_modules/.pnpm/nuxt-icon@0.2.10/node_modules/nuxt-icon/dist/runtime/Icon.vue:34:40

    32 | const component = computed(() => nuxtApp.vueApp.component(iconName.value))
    33 | const sSize = computed(() => {
  > 34 |   const size = props.size || appConfig.nuxtIcon?.size || '1em'
       |                                        ^^^^^^^^
    35 |   if (String(Number(size)) === size) {
    36 |     return `${size}px`
    37 |   }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants