How Stop After Running React-Scripts Start

How stop after running react-scripts start?

Hit your keyboard shortcut for stopping terminal commands (usually Ctrl+C or Ctrl+Q)

Or, if you don't have input access to the process, identify its PID and kill it :

On Windows :

C:\>Taskkill /PID <PID> /F

On Linux :

$>kill -SIGTERM <PID>

How to disable open browser in CRA?

Create .env file in the root directory where your package.json file resides. And add the following:

BROWSER=none

Now run npm start.

React app stuck on "Starting the development server"

I have something similar happening to me.

I have a react project that I want to convert to Typescript and I started as you noted with the "create-react-app", added all my files and hoped for the best - but got stuck like you on the “Starting the development server” message.

I have an 8GB Ram with Windows 10 and once I used the default "npm start" for the first time I've seen the node process uses a lot of memory - So I tried to give it more and at the same time I tired to change the port react uses.

  1. Added this to the start script in package.json:

    "scripts": {
    "start": "PORT=3001 react-scripts --max_old_space_size=8128 start",
    ...
    }

  2. Closed all my chrome browsers (they take pretty much memory)

  3. And gave it around 1 minute to run

After 1 minute it started working and from that point it just starts quickly and not uses as much memory and not depended on the port I choose

In my case - I guess the first time you run "npm start" on the React Typescript project it probably index the files (or does something similar - I'm not sure and probably need to read about it - I'm new to typescript) which take a lot of memory.

In your case - It might be something similar

Hope it helps :)

Sequential NPM script after "react-scripts start"

Yes it is possible, I use concurrently to do it within my projects

npm i concurrently

and add a new script, let's call it dev for example, then in your scripts:

"dev": "concurrently \"npm run start\" \"npm run start-electron\""

All that remains to do now is npm run dev

NPM Start stop working in VSCode REACT Development

Well I navigated to the correct subdirectory, re-installed some packages, ran NPM AUDIT FIX and it eventually started working again.
Partly common sense, partly voodoo/

How to run npm start without opening browser for react development on linux

Adding BROWSER=none to the .env file should get it solved.



Related Topics



Leave a reply



Submit