Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Automatically ask to run on next free port if port 3000 is busy #125

Open
Arrow7000 opened this issue Aug 1, 2017 · 3 comments
Open

Automatically ask to run on next free port if port 3000 is busy #125

Arrow7000 opened this issue Aug 1, 2017 · 3 comments

Comments

@Arrow7000
Copy link

Firstly thank you for this project! I tried to manually convert my CRA app to use TypeScript but it didn't work at all, so this is a lifesaver.

The original Create React App has a feature where if port 3000 is busy it will automatically ask if I want to run it on the next available port. This doesn't seem to be the case here because I just get this in the console

$ yarn start
yarn start v0.27.5
warning ..\..\package.json: No license field
$ react-scripts-ts start
Something is already running on port 3000.
Done in 2.28s.

Could this feature be added to this too?

@wmonk
Copy link
Owner

wmonk commented Aug 1, 2017

Think this should be covered by #104

@abenhamdine
Copy link

abenhamdine commented Aug 27, 2017

I don't see any difference with version 2.6.0, on Windows 10 64 bits (didn't try yet on linux).

I only get in the console :

$ yarn start
yarn start v0.27.5
$ react-scripts-ts start
Something is already running on port 3000.
Done in 2.22s.

For future Windows readers : one simple way to change the port used on Windows (eg to 3001) is to to create a .env file at the root of project, with the following line inside

PORT=3001

@alebrozzoSP
Copy link

I use VSCode on Win10 and this feature works fine, in the sense that it asks me if I want to run in port 3001 just as the non TS version.
I have c-r-a v1.4.0 installed globally, and typescript 2.5.2 also globally, and locally I use react 15.6.1 and react-scripts-ts 2.6.0
I hope this helps somehow :(

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

No branches or pull requests

4 participants