浏览器同步无法获取/ [英] Browser-sync Cannot GET /

查看:51
本文介绍了浏览器同步无法获取/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了浏览器同步,但是当我尝试启动服务器时出现此错误:

I just installed browser-sync but when I try to start a server I get this error:

      terkea@terkea-Lenovo-G50-80:~$ browser-sync start --server --files index.html[Browsersync] Access URLs:

<小时>

   Local: http://localhost:3000
External: http://192.168.1.3:3000
------------------------------------
      UI: http://localhost:3001
UI External: http://192.168.1.3:3001
------------------------------------

[Browsersync] 服务文件来自:./[Browsersync] 正在看文件...

[Browsersync] Serving files from: ./ [Browsersync] Watching files...

也许有人可以找出问题所在并帮助我?

Maybe someone could find what's wrong and help me please?

推荐答案

您必须指定文件所在的文件夹.我使用 ubuntu 18.04,它可以工作.例如,如果要打开目录/home/user/code 中的所有文件,则必须编写以下命令:

You must specify the folder in which your files are located. I use ubuntu 18.04 and it works. For example, if you want to open all files in directory /home/user/code you must write this command:

browser-sync start --server "/home/user/code/" --files "*.*"

这篇关于浏览器同步无法获取/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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