Skip to content

Nuxt 3.7+ : net::ERR_CONTENT_LENGTH_MISMATCH with VS Code Devcontainer #181

@ddahan

Description

@ddahan

Environment

Nuxt 3.7+

Reproduction

Note: the exact same codebase on Stackblitz works (including same node/npm versions), I suspect this is somehow related to my local environment. Here is below a repository reproduction containing a VS Code dev container:

Reproduction steps

  • Install Docker (I'm using Docker Desktop for Mac)
  • Install VS Code and VS Code Dev Container extension
  • Open VS Code, run the Clone Repository in Container Volume command, providing this url: https://github.com/ddahan/nuxt-starter-dev-container
  • Once the container is installed, run npm run dev in a terminal, and open Chrome Browser with the localhost url link.
  • Open the inspector, this should display the ERR_CONTENT_LENGTH_MISMATCH error.
image

Describe the bug

I have 3 projects running Nuxt (3.5 and 3.6). After upgrading any of them to Nuxt 3.7, I get an net::ERR_CONTENT_LENGTH_MISMATCH error in the browser when loading the page. The error happens on different potential files, and the site is basically unusable (not loaded completely, not clickable, etc.).

I'm using VS Code dev containers, which means the browser I'm using locally connects to a Docker container using port forwarding.

  • I tried using 3 local browsers but the error is the same.
  • I tried to run the server with the --host option but I got the same error.
  • I ensured there is enough space disk on my container

Any idea of what could have happened? I read the Nuxt 3.7 changelog and it seems there are many low-level changes that could explain this, but I'm not competent enough to understand.

Thanks.

EDIT: video added
https://github.com/nuxt/cli/assets/1933516/77acf4ce-411f-4493-85ad-5f8feb5b3467

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions