backstopmedia/bleeding-edge-sample-app

Npm start failed

Closed this issue · 1 comments

After cloning the repo and running npm install, npm start fails with the following error:

App started goto - http://0.0.0.0:8080
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: listen EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1156:14)
    at listen (net.js:1182:10)
    at Server.listen (net.js:1267:5)
    at EventEmitter.app.listen (/home/statistician/exercises/React/bleeding-edge-sample-app/node_modules/express/lib/application.js:595:24)
    at Object.<anonymous> (/home/statistician/exercises/React/bleeding-edge-sample-app/server/server.js:33:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

Contents of npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'start' ]
2 info using npm@2.11.2
3 info using node@v0.12.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart bleeding-edge-sample-app@0.0.1
6 verbose unsafe-perm in lifecycle true
7 info start bleeding-edge-sample-app@0.0.1
8 verbose unsafe-perm in lifecycle true
9 info bleeding-edge-sample-app@0.0.1 Failed to exec start script
10 verbose stack Error: bleeding-edge-sample-app@0.0.1 start: `node server/server.js`
10 verbose stack Exit status 1
10 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
10 verbose stack     at EventEmitter.emit (events.js:110:17)
10 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
10 verbose stack     at ChildProcess.emit (events.js:110:17)
10 verbose stack     at maybeClose (child_process.js:1015:16)
10 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid bleeding-edge-sample-app@0.0.1
12 verbose cwd /home/statistician/exercises/React/bleeding-edge-sample-app
13 error Linux 3.16.4-1-ARCH
14 error argv "node" "/usr/bin/npm" "start"
15 error node v0.12.4
16 error npm  v2.11.2
17 error code ELIFECYCLE
18 error bleeding-edge-sample-app@0.0.1 start: `node server/server.js`
18 error Exit status 1
19 error Failed at the bleeding-edge-sample-app@0.0.1 start script 'node server/server.js'.
19 error This is most likely a problem with the bleeding-edge-sample-app package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error     node server/server.js
19 error You can get their info via:
19 error     npm owner ls bleeding-edge-sample-app
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

Oh... it turns out that the port 8080 is used by another application. So it's not a bug. The error messages confused me.