error when starting dev server: TypeError: hostnameName.includes is not a function
Vue version
3.3.4
Link to minimal reproduction
https://vuejs.org/guide/quick-start.html#creating-a-vue-application
Steps to reproduce
docker pull node:18
docker run -it --rm -p 5173:5173 -v "$PWD:/app" -w /app node:18 bash
npm create vue@3 # accept all defaults
cd vue-project
yarn
yarn run dev --host 0
Result:
error when starting dev server:
TypeError: hostnameName.includes is not a function
at resolveServerUrls (file:///app/vue-project/node_modules/vite/dist/node/chunks/dep-75f53616.js:12481:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.listen (file:///app/vue-project/node_modules/vite/dist/node/chunks/dep-75f53616.js:64972:39)
at async CAC.<anonymous> (file:///app/vue-project/node_modules/vite/dist/node/cli.js:756:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
omitting the --host 0 option works fine
What is expected?
VITE v4.4.8 ready in 294 ms
➜ Local: http://0.0.0.0:5173/
➜ Network: use --host to expose
➜ press h to show help
What is actually happening?
error when starting dev server:
TypeError: hostnameName.includes is not a function
at resolveServerUrls (file:///app/vue-project/node_modules/vite/dist/node/chunks/dep-75f53616.js:12481:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.listen (file:///app/vue-project/node_modules/vite/dist/node/chunks/dep-75f53616.js:64972:39)
at async CAC.<anonymous> (file:///app/vue-project/node_modules/vite/dist/node/cli.js:756:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
System Info
docker on debian 12
Any additional comments?
omitting the --host 0
option works fine, but this is not what we want
npm run dev --host 0
seems to ignore the --host 0
option