Skip to content

[question] KV binding for nuxt og image #501

@remihuigen

Description

@remihuigen

Describe the bug
When following the example given in the nuxt og image docs (https://nuxtseo.com/docs/og-image/guides/cache#cache-storage) for setting a cache storage, I'm getting an error 👇

// nuxt.config.ts
ogImage: {
  runtimeCacheStorage: {
    driver: 'cloudflare-kv-binding',
    binding: 'OG_IMAGE_CACHE'
  }
}
{
  "error": "true",
  "url": "/__og-image__/image/dev/og.png",
  "statusCode": 500,
  "statusMessage": "[Nuxt OG Image] Failed to connect to cache /nuxt-og-image/5.0.2. Response from cache: [unstorage] [cloudflare] Invalid binding `OG_IMAGE_CACHE`: `undefined`",
  "message": "[Nuxt OG Image] Failed to connect to cache /nuxt-og-image/5.0.2. Response from cache: [unstorage] [cloudflare] Invalid binding `OG_IMAGE_CACHE`: `undefined`"
}

How can i set the correct binding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions