nuxt-modules / og-image

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

[error] (0 , _dirGlob.default) is not a function #116

Closed ropodl closed 10 months ago

ropodl commented 10 months ago

Describe the bug

Works properly on localhost

image

Reproduction

Sorry, I'll try again..

System / Nuxt Info

Production - Vercel

Local
Nuxt project info:                                                                                                                                3:09:16 AM

------------------------------
- Operating System: Linux
- Node Version:     v20.8.1
- Nuxt Version:     3.8.2
- CLI Version:      3.10.0
- Nitro Version:    2.8.0
- Package Manager:  bun@1.0.14
- Builder:          -
- User Config:      ssr, app, devtools, experimental, modules, ogImage, googleFonts, imports, site, mongoose, piniaPersistedstate, vuetify, sitemap, mail, pwa, runtimeConfig
- Runtime Modules:  @vueuse/nuxt@10.6.1, @pinia/nuxt@0.5.1, @nuxtjs/google-fonts@3.1.0, @vite-pwa/nuxt@0.2.3, @formkit/auto-animate/nuxt@0.8.1, @pinia-plugin-persistedstate/nuxt@1.2.0, nuxt-mongoose@1.0.3, vuetify-nuxt-module@0.7.0, nuxt-simple-sitemap@4.1.6, nuxt-delay-hydration@1.3.3, nuxt-mail@4.0.2
- Build Modules:    -
------------------------------
ropodl commented 10 months ago

Multiple install and uninstall somehow made it work.. Sorry the trouble

harlan-zw commented 10 months ago

hey @ropodl, no problem. Are you using the v3 beta version by any chance? I'm still working on getting it fully stable.

ropodl commented 10 months ago

So I looked back on the log, turns out it was "nuxt-og-image": "latest" with following nuxt.config.ts Tried v3 beta-12 in vercel causes error.. on /__og_image__/og.png now I back on v2.0.0

import colors from "vuetify/lib/util/colors"; // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ ssr: true, app: { head: { charset: "utf-8", viewport: "width=device-width, initial-scale=1", }, }, devtools: { enabled: true }, experimental: { viewTransition: true, inlineSSRStyles: false, componentIslands: true, }, modules: [ "@vueuse/nuxt", "@pinia/nuxt", "@nuxtjs/google-fonts", "@vite-pwa/nuxt", "@formkit/auto-animate/nuxt", "@pinia-plugin-persistedstate/nuxt", "nuxt-mongoose", "vuetify-nuxt-module", "nuxt-simple-sitemap", "nuxt-delay-hydration", "nuxt-mail", // "nuxt-security", // "nuxt-capo", "nuxt-og-image", ], googleFonts: { download: true, families: { Roboto: { wght: [100, 300, 400, 500, 700, 900], }, }, display: "swap", }, imports: { dirs: ["stores", "stores/frontend"], }, site: { url: process.env.BASE_URL, }, mongoose: { uri: process.env.MONGODB_URI, options: {}, modelsDir: "models", devtools: true, }, piniaPersistedstate: { storage: "localStorage", }, vuetify: { vuetifyOptions: { icons: { defaultSet: "mdi", }, theme: { defaultTheme: "dark", variations: { colors: [ "primary", "secondary", "error", "info", "success", "warning", ], lighten: 5, darken: 5, }, themes: { dark: { dark: true, colors: { primary: "#ff7a03", accent: colors.grey.darken3, secondary: colors.amber.darken3, info: colors.teal.lighten1, warning: colors.amber.base, error: colors.deepOrange.accent4, success: colors.green.accent3, // background: "#252734", }, }, }, }, }, }, sitemap: { sitemapName: "sitemap.xml", defaults: {}, exclude: ["/_nuxt/", "/admin/", "/login", "/api/"], }, mail: { message: { to: process.env.SMTP_USER, }, smtp: { host: "smtp.gmail.com", port: 587, auth: { user: process.env.SMTP_USER, pass: process.env.SMTP_PASSWORD, }, }, }, pwa: { registerType: "autoUpdate", workbox: { cleanupOutdatedCaches: true, navigateFallback: "/", globPatterns: ["/*.{js,css,html,ico,png,svg}"], }, manifest: { ................. }, runtimeConfig: {}, });

harlan-zw commented 10 months ago

Thanks for the details, the latest should be 2.2.4 so this is quite strange.

I'd wait for the v3 stable which will be within the next couple of days!

ropodl commented 10 months ago

will test it.. see u in discord then..