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

npm start error: No available ports found on windows wsl #4315

Open
jifffffy opened this issue Sep 18, 2024 · 6 comments
Open

npm start error: No available ports found on windows wsl #4315

jifffffy opened this issue Sep 18, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@jifffffy
Copy link

Error: No available ports found when I run npm start.

Bug Report 🐛

I follow the office doc to create a test project as follows:

# install deps
sudo apt install -y \
  libnss3 \
  libdbus-1-3 \
  libatk1.0-0 \
  libasound2t64 \  # libasound2 not exist refs https://github.com/cypress-io/cypress-documentation/issues/5816
  libxrandr2 \
  libxkbcommon-dev \
  libxfixes3 \
  libxcomposite1 \
  libxdamage1 \
  libgbm-dev \
  libatk-bridge2.0-0
 # create a project
npx create-video@latest

but i got an error when I run npm start:
image

other infomation:
os: ubuntu 24.04
remotion: 4.0.212

@jifffffy jifffffy added the bug Something isn't working label Sep 18, 2024
@JonnyBurger
Copy link
Member

Are you able to bind to any port between 3000 and 3001 with other frameworks?
Can you create a Next or Vite project for example?

@jifffffy
Copy link
Author

yes, I am sure no ohter process bind port 3000 and 3001,
it is ok when I run on the windows and mac. this is not the first my remotion project, but this is the first in the wsl.
I reboot the computer. but I still get the error.
thanks very much your quickly replay!

@jifffffy
Copy link
Author

jifffffy commented Sep 20, 2024

in get-port.ts file using the host addrest 127.0.0.1 and 0.0.0.0. cause that socket connect timeout
127.0.0.1 and 0.0.0.0 in wsl cannot access with any port. should use a real ip address.
if I remove the ipv4 address, everything is ok.
image

@JonnyBurger
Copy link
Member

Thanks for investigating - What is a real IP address then?
If localhost is not available?

@JonnyBurger
Copy link
Member

@jifffffy
Copy link
Author

The real address can get in the wsl as follows:

ip route show | grep -i default | awk '{ print $3}'

so it is good passing as a flag to the cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants