polyserve无法为应用程序提供服务

时间:2018-04-02 14:13:58

标签: polymer web-development-server polymer-cli

节点v8.11 NPM v5.6

每当我尝试调用聚合物服务时,就会发生错误,告知服务器无法启动并且没有可用端口,这是错误的!大多数端口都可用。

$ 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上,我通过包安装程序表单在网站上安装了节点

1 个答案:

答案 0 :(得分:1)

@synk在评论中说:

  

聚合物服务--hostname 0.0.0.0或用IP替换0.0.0.0   可在机器上使用