我已經安裝了
- Node.js的
- 科爾多瓦
- 離子
安裝後,我創建了一個項目作爲
$ionic start myApp
$cd myApp
$ionic serve
但本地主機不加載任何東西和終端顯示以下錯誤:
The port 8100 was taken on the host localhost - using port instead
Gulp startup tasks: 0=sass, 1=watch
Running live reload server: undefined
Watching: 0=www/**/*, 1=!www/lib/**/*
Running dev server: http://localhost:
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
ionic $ events.js:141
throw er; // Unhandled 'error' event
^
Error: listen EADDRNOTAVAIL 192.168.1.5
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1221:19)
at listen (net.js:1270:10)
at net.js:1379:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:64:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:83:10)
什麼問題?
[events.js:141 throw er; //未處理的'錯誤'事件](http://stackoverflow.com/questions/34290796/events-js-141-throw-er-unhandled-error-event) – Atula
您是否正在運行其他可能導致衝突的應用程序?您是否嘗試過使用'ionic serve -p [端口號]'在不同的端口上運行此應用程序,例如:'ionic serve -p 8005' – Dexter
更改端口號後出現同樣的錯誤。 –