0

my webback dev server doesn't work properly in windows 7, cygwin.

It always work for on the first time but when i terminate the process and re-run it will get the error of the port already in use.

Error: listen EADDRINUSE 127.0.0.1:9000

Here is the configuration content of my webpack dev server.

var config = {
   entry: './main.js',

   output: {
      path:'./',
      filename: 'index.js',
   },

   devServer: {
     historyApiFallback: true,
     contentBase: './',
     inline: true,
     port : 9000
   },

   module: {
      loaders: [
         {
            test: /\.jsx?$/,
            exclude: /node_modules/,
            loader: 'babel',

            query: {
               presets: ['es2015', 'react']
            }
         }
      ]
   }
}

module.exports = config;

I have check the Active connection and found it in use, but i can't kill it.

$ netstat -a -n -o'
TCP    127.0.0.1:9000         0.0.0.0:0              LISTENING       13960

$ taskkill /PID 13960 
ERROR: The process with PID 13960 could not be terminated.  
Reason: This process can only be terminated forcefully (with /F option).

Thanks.

Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
  • probably a duplicate question, refer this http://stackoverflow.com/questions/3151314/killing-a-process-with-taskkill-f-returning-code-0 – anoop Aug 13 '16 at 22:19
  • Hi, thanks for the reference link. Is there any other ways to auto terminate webpack dev process when i hit ctrl+c ? – Tan Chong Yong Aug 14 '16 at 13:25

0 Answers0