问题 - 当我运行 gulp 时,出现以下消息:
[Browsersync] Couldn't open a browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)
gulpfile.js 代码:
gulp.task('serve', function() {
browserSync.init({
open: 'external',
proxy: 'site1.net', // baseDir: "./"
watchTask: true,
port: 8080,
browser: "chrome"
});
});
我必须手动将 URL 输入到浏览器中,它适用于我当前的连接,但消息仍然存在。那么我该如何解决这个问题呢?任何帮助将不胜感激,谢谢
截图:
http://www.screencast.com/t/rZDYsPLvM1uv
http://www.screencast.com/t/6MMLk5gA
http://www.screencast.com/t/9EoNLhAlK
(注意:抱歉,经过多次尝试后超链接语法无法正常工作,这很奇怪。)
历史:
我之前的浏览器同步没有问题,我的 gulp 自动运行 - 直到现在。我想我今天有 Windows 10 64 位更新,这个问题就出来了。一切似乎正常,除了浏览器同步问题。
我尝试了这些链接,但似乎没有任何效果: