ReduxSimpleStarter
ReduxSimpleStarter copied to clipboard
npm start throw an error, can't run the course
PS D:\Code\react\web\ReduxSimpleStarter> npm start
[email protected] start D:\Code\react\web\ReduxSimpleStarter node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js
events.js:160 throw er; // Unhandled 'error' event ^
Error: listen EACCES 127.0.0.1:8080
@eran-or More than likely that port is already in use on your machine, or the server is already running. You can either end the process that is running on the port, or you can change the port that webpack dev server is running on.
If you open the webpack.config.js file, and update this code:
devServer: {
historyApiFallback: true,
contentBase: './'
}
to:
devServer: {
historyApiFallback: true,
contentBase: './',
port: 3000
}
The server should start on port 3000. You can choose another port if you want.
@scottwestover It worked, thank you.
This fix really should be pulled into the master branch. Thanks @scottwestover !