nuxt / bridge

🌉 Experience Nuxt 3 features on existing Nuxt 2 projects
MIT License
271 stars 29 forks source link

Fresh Nuxt 2 with Content Module and Nuxt Bridge giving a 500 page #301

Closed Jamiewarb closed 2 years ago

Jamiewarb commented 2 years ago

Environment

npx: installed 3 in 0.909s Nuxt CLI v3.0.0-27243046.225e3ba 19:53:58 RootDir: /Users/jamie/Sites/bignight/bridge-content 19:53:58 Nuxt project info: 19:53:58


Describe the bug

When creating a fresh installation of Nuxt 2 with the Content module, and adding Nuxt Bridge, the resulting build doesn't not work.

Reproduction

See repo: https://github.com/hex-digital/bridge-content

create-nuxt-app v3.7.1
✨  Generating Nuxt.js project in bridge-content
? Project name: bridge-content
? Programming language: JavaScript
? Package manager: Yarn
? UI framework: None
? Nuxt.js modules: Content - Git-based headless CMS
? Linting tools:
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools:
? What is your GitHub username? jamiewarb
? Version control system: Git
inject('content', value) has no value provided
  at inject (file://./.output/server/chunks/app/server.mjs:12950:17)
  at plugin_server (file://./.output/server/chunks/app/server.mjs:12751:7)
  at createApp (file://./.output/server/chunks/app/server.mjs:12977:15)
  at async __webpack_exports__.default (file://./.output/server/chunks/app/server.mjs:13084:11)
  at async renderToString (file://./.output/server/chunks/app/render.mjs:270:19)
  at async renderMiddleware (file://./.output/server/chunks/app/render.mjs:577:20)
  at async handle (file://./.output/server/node_modules/h3/dist/index.mjs:572:19)

Additional context

This still happens when bridge: false is added to nuxt.config.js.

But it does not happen before upgrading to use Bridge.

Logs

No response

nonlinearcom commented 2 years ago

@Nuxt/content is not (yet) compatible with Bridge: https://v3.nuxtjs.org/getting-started/bridge/#remove-incompatible-and-obsolete-modules

Jamiewarb commented 2 years ago

Thank you!

PatrickMcGrath29 commented 1 year ago

Is there any plan to make Nuxt content (either v1 or v2) compatible with Nuxt bridge?