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

when using --host flag on one project, local always opens on :3000 #372

Open
moshetanzer opened this issue Mar 21, 2024 · 2 comments
Open

Comments

@moshetanzer
Copy link

moshetanzer commented Mar 21, 2024

Hi @pi0,

Hope you well

Came across an interesting bug, if you run a nuxt app pnpm run dev, and run another nuxt app using pnpm run dev --host, the local of the second app instead of incrementing by one to :3001 it also opens on :3000.

However, when running the first app using pnpm run dev --host and then second app same command with same --host flag it increments the port correctly.

Using latest version of nuxt on both.

Thanks for your work!

Thoughts?

@moshetanzer moshetanzer changed the title when using --host local always opens on :3000 when using --host flag on one project, local always opens on :3000 Mar 21, 2024
@moshetanzer
Copy link
Author

@pio, think i have found the issue - it is in the _tryPort function in the get-port-please lib.

Think we need to either add a flag in this lib that when network --host then make sure that port is available on both or give diffrent ports

https://github.com/unjs/get-port-please/blob/6b48bb4b15fe5cc854be3a6cf1486958d549c688/src/_internal.ts#L33

dont think it is an issue with listhen..

Thoughts?

@moshetanzer
Copy link
Author

@pi0 @danielroe can someone help? Would really appreciate it - this has been so painful!

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

No branches or pull requests

1 participant