polyserve 无法为该应用提供服务

polyserve cannot serve the app

节点 v8.11 NPM v5.6

每当我尝试调用 polymer serve 时,都会发生错误,提示服务器无法启动且没有可用端口,这是错误的!大多数端口都可用。

$ polymer serve
ERROR: Server failed to start: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
    at /Users/nabed/.config/yarn/global/node_modules/polyserve/lib/start_server.js:380:15
    at Generator.next (<anonymous>)
    at fulfilled (/Users/nabed/.config/yarn/global/node_modules/polyserve/lib/start_server.js:17:58)
    at <anonymous>
error:   cli runtime exception: Error: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
error:   Error: Error: No available ports. Ports tried: [8081,8000,8001,8003,8031,2000,2001,2020,2109,2222,2310,3000,3001,3030,3210,3333,4000,4001,4040,4321,4502,4503,4567,5000,5001,5050,5432,6000,6001,6060,6666,6543,7000,7070,7774,7777,8765,8777,8888,9000,9001,9080,9090,9876,9877,9999,49221,55001]
    at /Users/nabed/.config/yarn/global/node_modules/polyserve/lib/start_server.js:91:19
    at Generator.throw (<anonymous>)
    at rejected (/Users/nabed/.config/yarn/global/node_modules/polyserve/lib/start_server.js:18:65)
    at <anonymous>

这里是 --verbose 错误日志文本 http://freetexthost.com/2sjgr45yx5 我在 mac,我通过网站

上的软件包安装程序安装了节点

正如@synk 在评论中所说:

polymer serve --hostname 0.0.0.0 or replace 0.0.0.0 with an IP that is available on the machine