Skip to content

Cannot change port #4733

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

Closed
bilogic opened this issue May 5, 2025 · 4 comments
Closed

Cannot change port #4733

bilogic opened this issue May 5, 2025 · 4 comments
Labels
need more info Further information is requested

Comments

@bilogic
Copy link

bilogic commented May 5, 2025

import { defineConfig } from 'vitepress';

export default defineConfig({
  vite: {
    // @ts-ignore
    foo: 'bar',
    plugins: [
      {

        },

Originally posted by @brc-dd in #1706

    vite: {
        server: {
            port: 5171,
        },
    },
  1. Based on the example above, I added above, but my port did not change.
  2. Also tried creating vite.config.ts, but port still remained as the default 5172
  3. Any idea what I'm missing?
@brc-dd
Copy link
Member

brc-dd commented May 5, 2025

Please create an issue using one of the templates. Your issue description doesn't explain your problem.

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2025
@bilogic
Copy link
Author

bilogic commented May 5, 2025

Sorry, it was easier to create and then edit. I have updated my OP. Thanks.

@brc-dd
Copy link
Member

brc-dd commented May 5, 2025

You can just run vitepress dev docs --port 5171 for that.

Also, specifying port like you wrote works fine - https://stackblitz.com/edit/vite-wueptozj?file=docs/.vitepress/config.ts

default 5172

default is 5173

If it's running at 5172 for you, then you might have some other process running at 5171.

@brc-dd brc-dd reopened this May 5, 2025
@brc-dd brc-dd added the need more info Further information is requested label May 5, 2025
@bilogic
Copy link
Author

bilogic commented May 5, 2025

Yea I reboot the server and it's working now. Thank you so much!

@bilogic bilogic closed this as completed May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants