Skip to content

Error in dev-server since version 3.12.3 when behind proxy #28019

Description

@HendrikJan

Environment


  • Operating System: Linux
  • Node Version: v20.13.1
  • Nuxt Version: 3.12.3
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: npm@10.5.2
  • Builder: -
  • User Config: modules, i18n, ssr, compatibilityDate
  • Runtime Modules: @nuxtjs/i18n@8.3.1
  • Build Modules: -

Reproduction

Because this issue occurs when behind a reverse proxy, I could not reproduce this in stackblitz or codesandbox.

I build a simple Docker Compose repo to reproduce the issue:
https://github.com/HendrikJan/nuxt-with-apache-issue

Reproduce:
See the README of the above repository or do the following steps:

  • Start Docker Compose: docker compose up
  • Get into the container: docker compose exec mynode bash
  • In the container run: npm run dev
  • Open the browser on http://localhost:4000 and see the error in the console

Describe the bug

After starting the server with npm run dev, the first time you open http://localhost:4000, the page doesn't load and you get an error in your browser console.

The second and subsequent times you open the browser (or another browser) the page loads and the error disappears.

Additional context

The problem only exists when running through a reverse proxy (Apache in this case).
The problem also only exists when loading modules (@nuxtjs/i18n in this case).

Logs

Errors in the Firefox console:

[Vue warn]: Unhandled error during execution of render function 
  at <Default ref=Ref< undefined > > 
  at <LayoutLoader key="default" layoutProps= 

and

Uncaught (in promise) TypeError: currentRenderingInstance is null

Errors in the Chromium console:

[Vue warn]: Unhandled error during execution of render function 
  at <Default ref=Ref< undefined > > 
  at <LayoutLoader key="default" layoutProps= Object name="default" > 
  at <NuxtLayoutProvider layoutProps= Object key="default" name="default"  ... > 
  at <NuxtLayout> 
  at <App key=4 > 
  at <NuxtRoot>

and

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isCE')
    at renderSlot (runtime-core.esm-bundler.js?v=4b6dd004:2083:32)
    at Proxy._sfc_render (default.vue:4:5)
    at renderComponentRoot (runtime-core.esm-bundler.js?v=3bed71f0:886:16)
    at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?v=3bed71f0:5123:46)
    at ReactiveEffect.run (reactivity.esm-bundler.js?v=3bed71f0:150:19)
    at instance.update (runtime-core.esm-bundler.js?v=3bed71f0:5254:17)
    at setupRenderEffect (runtime-core.esm-bundler.js?v=3bed71f0:5264:5)
    at mountComponent (runtime-core.esm-bundler.js?v=3bed71f0:5032:7)
    at processComponent (runtime-core.esm-bundler.js?v=3bed71f0:4986:9)
    at patch (runtime-core.esm-bundler.js?v=3bed71f0:4456:11)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions