Skip to content

Having issues with slow responses with nuxi dev #209

@pi0

Description

@pi0

Starting with the 3.7.0 release of the nuxi CLI, we added a security fix to prevent exposing the dev server port to the local-area network by default, limiting its access to your computer only.

Initially, using 127.0.0.1 as a localhost IP address tended to work fine on MacOS and Linux operating systems. However, we soon received bug reports indicating that it caused slower builds on Windows, Docker, and WSL2. The reason is that localhost can be resolved to either 127.0.0.1 (IPv4) or ::1 (IPv6), and on some operating systems, they first attempt to use IPv6 (::1) each time. This behavior was not available, and a timeout occurred before falling back to 127.0.0.1, causing slow build issues.

In the latest release of nuxi 3.9 and unjs/listhen via unjs/listhen#126, we have adjusted the defaults to better support Windows, WSL2, and Docker. At least in my homelab Windows VM, it now shows fast builds again when using the default nuxi host and opening it in http://localhost:3000.

If you were previously using any workarounds involving the --host argument or HOST environment variable, please consider removing them and trying again.

You can update to the latest version of nuxi by using nuxi upgrade, or you can try it with npx nuxi@latest dev or bun x nuxi@latest dev. You can ensure you have the latest version by using the nuxi info or nuxi --version commands.


If you continue to experience slow build issues, they may have different causes. In this case, further investigation is necessary.

Please report the issue in this thread along with the full output of the nuxi info command, including your local host information. Also, mention if you are using WSL2 or any custom setup.

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