Polyserve无法为应用程序提供服务 [英] polyserve cannot serve the app

查看:153
本文介绍了Polyserve无法为应用程序提供服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

节点v8.11 NPM v5.6

Node v8.11 NPM v5.6

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

Whenever I try to call polymer serve an error occurs telling that server failed to start and no available ports, which is wrong! most of the ports are available.

$ 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上,通过网站上的软件包安装程序安装了节点

here is a --verbose err log text http://freetexthost.com/2sjgr45yx5 I am on mac, I installed node via package installer form there website

推荐答案

正如@synk在评论中说的那样:

As @synk said on the comment:

聚合物服务-主机名0.0.0.0或将0.0.0.0替换为IP 在机器上可用的

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

这篇关于Polyserve无法为应用程序提供服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆