nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.13k stars 627 forks source link

Combining Nuxt Content and openAPI: true gives rollup errors, breaks build #2839

Open pmcp opened 1 week ago

pmcp commented 1 week ago

Environment

Reproduction

Starting with https://github.com/nuxt-hub/starter and adding nuxt content.

Describe the bug

When I add

  nitro: {
    experimental: {
      // Enable Server API documentation within NuxtHub
      openAPI: true
    }
  },

to nuxt.config, it gives me the error

RollupError: virtual:#nitro-internal-virtual/server-handlers-meta (32:7): Identifier "_vtEFC3Meta" has already been declared

30: import _P2WQbkMeta from "/Users/pmcp/Documents/GitHub/kdm/node_modules/.pnpm/@nuxthub+core@0.8.6_ioredis@5.4.1_magica...
31: import _vtEFC3Meta from "/Users/pmcp/Documents/GitHub/kdm/node_modules/.pnpm/@nuxt+content@2.13.4_ioredis@5.4.1_magic...
32: import _vtEFC3Meta from "/Users/pmcp/Documents/GitHub/kdm/node_modules/.pnpm/@nuxt+content@2.13.4_ioredis@5.4.1_magic...
           ^
33: import _vtEFC3Meta from "/Users/pmcp/Documents/GitHub/kdm/node_modules/.pnpm/@nuxt+content@2.13.4_ioredis@5.4.1_magic...
34: import _qfWoImMeta from "/Users/pmcp/Documents/GitHub/kdm/node_modules/.pnpm/@nuxt+content@2.13.4_ioredis@5.4.1_magic...

This experimental feature is included in the nuxthub starter, it seems to only break if nuxt content is added.

Combining Nuxt Content and openAPI: true seems to be the issue (for me).

Additional context

No response

Logs

No response