nuxt-modules / og-image

Generate OG Images with Vue templates in Nuxt.
https://nuxtseo.com/og-image
415 stars 27 forks source link

Error when trying to build project #48

Closed Bumbleboss closed 1 year ago

Bumbleboss commented 1 year ago

Describe the bug

Build stops when facing this error. image

Could be related to previous issue #42 related to fonts image

On latest beta 2.0.0-beta.32

Reproduction

No response

System / Nuxt Info

No response

harlan-zw commented 1 year ago

Hmm weird, this is just a type issue. Could you try deleting your .nuxt folder and trying again? I can't seem to replicate the problem.

If it's still broken it may be a Nuxt core issue around how the module typings are generated. Would you be able to provide your config?

Bumbleboss commented 1 year ago

Deleted .nuxt folder, didn't work. I am using SEO kit along with latest og image beta.

export default defineNuxtConfig({
  runtimeConfig: {
    public: {
      ///
    }
  },

  extends: [
    'nuxt-seo-kit'
  ],

  ogImage: {
    fonts: [
      'Manrope:500',
      {
        name: 'optieinstein',
        weight: 800,
        path: '/fonts/OPTIEinstein_black.woff',
      }
    ]
  },

  modules: [
    '@nuxt/content',
    '@nuxt/image-edge',
    'nuxt-og-image'
  ],

  app: {
    head: {
      ///
    }
  }
})
Bumbleboss commented 1 year ago

Hello, I wanted to give an update on the issue. I have tried reproducing it with this setup using yarn generate and the error is there.

https://stackblitz.com/edit/github-ocxs1d-hbxtdw

The generated type in .nuxt/types/schema.d.ts

harlan-zw commented 1 year ago

Upstream issue in untyped https://github.com/unjs/untyped/pull/96

Once this fix is merged then Nuxt will use it and the issue will be fixed. Will keep open until then.

harlan-zw commented 1 year ago

2.0.0-beta.45 also fixes this :)