angular-phonecat icon indicating copy to clipboard operation
angular-phonecat copied to clipboard

problem with npm start

Open TejOP opened this issue 10 years ago • 6 comments

Using a mac and this fails on my system: http-server -a localhost -p 8000 -c-1 ./app

npm debug log: 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info prestart [email protected] 6 verbose unsafe-perm in lifecycle true 7 info start [email protected] 8 verbose unsafe-perm in lifecycle true 9 info [email protected] Failed to exec start script 10 verbose stack Error: [email protected] start: http-server -a localhost -p 8000 -c-1 ./app 10 verbose stack spawn ENOENT 10 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:17:16) 10 verbose stack at emitTwo (events.js:87:13) 10 verbose stack at ChildProcess.emit (events.js:172:7) 10 verbose stack at maybeClose (internal/child_process.js:827:16) 10 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 11 verbose pkgid [email protected] 12 verbose cwd /Users/tejmulchandani/angular-phonecat 13 error Darwin 14.5.0 14 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 15 error node v4.4.5 16 error npm v2.15.5 17 error file sh 18 error code ELIFECYCLE 19 error errno ENOENT 20 error syscall spawn 21 error [email protected] start: http-server -a localhost -p 8000 -c-1 ./app 21 error spawn ENOENT 22 error Failed at the [email protected] start script 'http-server -a localhost -p 8000 -c-1 ./app'. 22 error This is most likely a problem with the angular-phonecat package, 22 error not with npm itself. 22 error Tell the author that this fails on your system: 22 error http-server -a localhost -p 8000 -c-1 ./app 22 error You can get information on how to open an issue for this project with: 22 error npm bugs angular-phonecat 22 error Or if that isn't available, you can get their info via: 22 error 22 error npm owner ls angular-phonecat 22 error There is likely additional logging output above. 23 verbose exit [ 1, true ]

TejOP avatar Jun 15 '16 06:06 TejOP

Can you try running the following command from the root of your phonecat project in your terminal:

./node_modules/.bin/http-server -a localhost -p 8000 -c-1 ./app

petebacondarwin avatar Jun 15 '16 10:06 petebacondarwin

I am experiencing the same issue but I think mine is because I have a company parallels management listener on the port. This is the output of the recommended command: $ ./node_modules/.bin/http-server -a localhost -p 8000 -c-1 ./app events.js:154 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE 127.0.0.1:8000 at Object.exports._errnoException (util.js:893:11) at exports._exceptionWithHostPort (util.js:916:20) at Server.__dirname.Server.Server._listen2 (net.js:1246:14) at listen (net.js:1282:10) at net.js:1391:9 at GetAddrInfoReqWrap.asyncCallback as callback at GetAddrInfoReqWrap.onlookup as oncomplete

HaullingLlama avatar Jun 23 '16 21:06 HaullingLlama

@HaullingLlama, yours is a different problem. Port 8000 is already in use (maybe from another instance of the http-server). For more info see here.

gkalpak avatar Jun 24 '16 04:06 gkalpak

Yes my problem is the port issue. Unfortunately I am trying to do this tutorial for work and at work and we have a company installed service running on that port that I can't stop so I can't use the tutorial. :(

HaullingLlama avatar Jun 27 '16 19:06 HaullingLlama

@HaullingLlama, you can just change the port used by the tutorial. You need to change it in package.json (in the start script) and in e2e-tests/protractor.conf.js (change the baseUrl). (Although, it might be a little tedious to change it every time you check out a new step :disappointed:)

gkalpak avatar Jun 28 '16 04:06 gkalpak

Closing since we didn't hear from the OP in a while. Feel free to reopen, if this is still an issue.

gkalpak avatar Jul 19 '16 06:07 gkalpak