Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when starting dev server: TypeError: hostnameName.includes is not a function #8901

Closed
simevo opened this issue Aug 2, 2023 · 1 comment

Comments

@simevo
Copy link

simevo commented Aug 2, 2023

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

@LinusBorg
Copy link
Member

That should be reported to the vite project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants