我已经安装了
安装后我创建了一个项目
$ionic start myApp
$cd myApp
$ionic serve
但是localhost没有加载任何东西,终端显示以下错误:
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)
有什么问题?
答案 0 :(得分:0)
更新离子版
npm install -g ionic
或
npm install -g ionic@1.1.7
或
npm install -g ionic@1.1.9-beta1
答案 1 :(得分:0)
是的,我得到了解决方案 我需要在使用
之前使用以下代码$ ionic serve
首先输入
$ionic address
它会显示
1)your IP-Address
2)localhost
选择第一个选项,即您的IP地址 而现在,你可以使用$ ionic serve 它,现在正在工作。
全部谢谢。