文章详情页
老师,请问我打开browsersync出现这个问题怎么解决啊?
浏览:65日期:2022-11-01 11:57:57
问题描述
问题解答
回答1:demo文件夹下面有个静态页面,就在当前目录的命令行工具通过:
browser-sync start --server --files "css/*.css"
来启动browser-sync;
var opn = require("opn");opn(url, options).catch(function() { bs.events.emit("browser:error");});
源代码在:https://github.com/BrowserSyn...
只有在opn这个库打开出错的时候才会报这个错。
"browser:error": function () { logger.error("Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the {cyan:open} option to {cyan:false})");},
源代码在:https://github.com/BrowserSyn...
我的建议是清理缓存,重装依赖,升级版本。
如果再报错,把BrowserSync的open开关置为false再试试吧。
相关文章:
排行榜
