In package.json
In development Webpack compiles your application runs it in-memory. Only when
you run $ npm run build
will it write to disk and preserve your bundled
application across computer restarts.
This simply means that there's another process already listening on port 3000.
The fix is to kill the process and rerun npm start
.
-
Find the process id (PID):
$ ps aux | grep node
This will return the PID as the value following your username:
$ janedoe 29811 49.1 2.1 3394936 356956 s004 S+ 4:45pm 2:40.07 node server
-
Then run
$ kill -9 YOUR_PID
e.g. given the output from the example above,
YOUR_PID
is29811
, hence that would mean you would runkill -9 29811
-
Find the process id (PID):
C:\> netstat -a -o -n
This will return a list of running processes and the ports they're listening on:
Proto Local Address Foreign Address State PID TCP 0.0.0.0:25 0.0.0.0:0 Listening 4196 ... TCP 0.0.0.0:3000 0.0.0.0:0 Listening 28344
-
Then run
C:\> taskkill /F /PID YOUR_PID
e.g. given the output from the example above,
YOUR_PID
is28344
, hence that would mean you would runtaskkill /F /PID 28344
Submit an issue, hop onto the Gitter channel or contact Max direct on twitter!