-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Bug Report
Nuxt version(s) tested: 4.1.3, 4.2.0
Node version: (v24.0.0)
Package manager: (npm)
Operating system: (Linux)
I’m encountering the following error when running the Nuxt dev server with the --host flag:
ERROR The "hostname" argument must be of type string. Received type boolean (true)
This happens in both Nuxt 4.1.3 and Nuxt 4.2.0, even though the same configuration used to work correctly before.
In package.json:
"scripts": {
"dev": "nuxt dev -p 3000 --host"
}
Running:
npm run dev
Previously, this command exposed the Nuxt app on all network interfaces, which was useful for deployment or testing on linked servers.
Now, it fails with the error above.
The error originates from the get-port-please package, which is a dependency of @nuxt/devtools.
### Steps to Reproduce
Create or open any Nuxt 4.1.3 or 4.2.0 project.
Add the following dev script in package.json:
"dev": "nuxt dev -p 3000 --host"
Run:
npm run dev
You’ll see:
ERROR The "hostname" argument must be of type string. Received type boolean (true)
Any insights on this issue? Also, what’s the best practice to achieve the same behavior as --host previously provided?