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

Port 5000 is taken on MacOS Monterey #715

Closed
3 tasks done
politician opened this issue Jun 4, 2022 · 4 comments · Fixed by #856
Closed
3 tasks done

Port 5000 is taken on MacOS Monterey #715

politician opened this issue Jun 4, 2022 · 4 comments · Fixed by #856
Labels
enhancement New feature or request

Comments

@politician
Copy link

Describe the bug

Port 5000 which is used by default by vitepress serve is already taken by system processes on MacOS Monterey.

Reproduction

Run vitepress serve in MacOS Monterey

Expected behavior

Serve the vitepress website

System Info

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 499.31 MB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/.volta/tools/image/node/16.14.2/bin/node
    Yarn: 1.22.17 - ~/.volta/tools/image/yarn/1.22.17/bin/yarn
    npm: 8.5.0 - ~/.volta/tools/image/node/16.14.2/bin/npm
  Browsers:
    Chrome: 102.0.5005.61
    Firefox: 100.0.2
    Firefox Developer Edition: 97.0
    Safari: 15.5

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@politician politician added the bug: pending triage Maybe a bug, waiting for confirmation label Jun 4, 2022
@brc-dd brc-dd added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jun 4, 2022
@brc-dd
Copy link
Member

brc-dd commented Jun 4, 2022

Run it like this:

vitepress serve docs --port 8080

We currently don't attempt serving on next available port because many people are using vitepress serve to host their sites, if the port is auto-incremented then there might be certain issues due to the port not being fixed. Hence, we leave this to our users to explicitly specify the port to serve on.

@brc-dd brc-dd closed this as completed Jun 4, 2022
@brc-dd brc-dd removed the bug Something isn't working label Jun 4, 2022
@politician
Copy link
Author

We currently don't attempt serving on next available port because many people are using vitepress serve to host their sites, if the port is auto-incremented then there might be certain issues due to the port not being fixed. Hence, we leave this to our users to explicitly specify the port to serve on.

Ok this totally makes sense.

@JounQin
Copy link
Contributor

JounQin commented Jun 21, 2022

@brc-dd So why not change a new constant port instead?

@kiaking
Copy link
Member

kiaking commented Jun 21, 2022

Vite is using 4173 for preview feature so maybe we could align with it 👀

@brc-dd brc-dd reopened this Jun 21, 2022
@kiaking kiaking added the enhancement New feature or request label Jun 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
4 participants