2016-03-31 20 views
0

Ben açısal js için tamamen yeni ve ben this öğretici üzerinden öğrenmeye başladım. npm start kullanarak geliştirme web sunucusu çalışırken aşağıda hatayı alıyorum: Ben de adresi ve port ama hala aynı hatayı değiştirmeyi denedihatası npm npm start komutu açısal js içinde başlat komutu

> [email protected] prestart /path_to/angular-phonecat 
> npm install 


> [email protected] postinstall /path_to/angular-phonecat 
> bower install 


> [email protected] start /path_to/angular-phonecat 
> http-server -a 0.0.0.0 -p 8000 

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

Error: listen EADDRINUSE 0.0.0.0:8000 
    at Object.exports._errnoException (util.js:870:11) 
    at exports._exceptionWithHostPort (util.js:893:20) 
    at Server._listen2 (net.js:1238:14) 
    at listen (net.js:1274:10) 
    at net.js:1383:9 
    at doNTCallback3 (node.js:452:9) 
    at process._tickCallback (node.js:358:17) 
    at Function.Module.runMain (module.js:469:11) 
    at startup (node.js:136:18) 
    at node.js:963:3 

npm ERR! Darwin 15.3.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v4.2.4 
npm ERR! npm v2.14.12 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `http-server -a 0.0.0.0 -p 8000` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'http-server -a 0.0.0.0 -p 8000'. 
npm ERR! This is most likely a problem with the angular-phonecat package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  http-server -a 0.0.0.0 -p 8000 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls angular-phonecat 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /pathto/angular-phonecat/npm-debug.log 

. Birisi yardımcı olabilir mi?

PS: Ben Osx kullanıyorum.

cevap

0

sonra, 5 basamaklı bir sayı gibi inanıyorum ikinci sütun olmalıdır, komut satırına gidip

ps aux | grep 8000 

yapmak ve PID numarası almak;

kill -9 <PID> 

npm'yi yeniden başlatın.

Bunun yerine angular2'yi öğütlemeyi öneririm. Şimdi açısal 1 öğrenmek için çok yararı olmayacaktır.

+0

Aynı şey için iyi bir eğitim önerebilir misiniz? –

+0

Ayrıca yaptım, ancak aynı hatayı aldım –

+0

https://angular.io/docs/ts/latest/quickstart.html –

0

EADDRINUSE - bu, bu sunucunun kullanmaya çalıştığı bağlantı noktası zaten başka bir işlem tarafından kullanılıyor demektir, bu nedenle önce onu öldürün ve sunucunuzu yeniden çalıştırın.