react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

npm start throw unhandled error event #290

Closed ashussen closed 7 years ago

ashussen commented 7 years ago

I have followed the instruction. But when I do npm start

it returns like this:

@0.0.1 start /home/albert/www/albertsamuel.me node server.js --env=dev

events.js:141 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE 127.0.0.1:8000 at Object.exports._errnoException (util.js:907:11) at exports._exceptionWithHostPort (util.js:930:20) at Server._listen2 (net.js:1250:14) at listen (net.js:1286:10) at net.js:1395:9 at GetAddrInfoReqWrap.asyncCallback as callback at GetAddrInfoReqWrap.onlookup as oncomplete

npm ERR! Linux 4.4.0-36-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v4.5.0 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE npm ERR! @0.0.1 start: node server.js --env=dev npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @0.0.1 start script 'node server.js --env=dev'. npm ERR! This is most likely a problem with the package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node server.js --env=dev npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/albert/www/albertsamuel.me/npm-debug.log

It seems there is an error in server.js file.

ashussen commented 7 years ago

I have found that the problem is port 8000 is busy. Seems that there is some process occupied that port, obviously this is not yeoman's issue.

Sorry about that.