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 vue3 dev server: TypeError: hostnameName.includes is not a function #14009

Closed
simevo opened this issue Aug 2, 2023 · 0 comments · Fixed by #14013
Closed
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@simevo
Copy link

simevo commented Aug 2, 2023

Describe the bug

I tried the Vue 3 quick start guide and started the dev server with --host 0, that crashes with TypeError: hostnameName.includes is not a function; omitting the --host 0 option works fine.

Previously reported as vuejs/core#8901.

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

System Info

docker on debian 12


  System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 14.42 GB / 23.00 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.6.7 - /usr/local/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^4.2.3 => 4.2.3 
    vite: ^4.3.9 => 4.4.8


### Used Package Manager

yarn

### Logs

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. (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


### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Aug 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants