Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 狼吞虎咽+;浏览器同步失败_Javascript_Angularjs_Node.js_Browser Sync_Gulp Browser Sync - Fatal编程技术网

Javascript 狼吞虎咽+;浏览器同步失败

Javascript 狼吞虎咽+;浏览器同步失败,javascript,angularjs,node.js,browser-sync,gulp-browser-sync,Javascript,Angularjs,Node.js,Browser Sync,Gulp Browser Sync,我正在使用浏览器同步运行Gulp,并在Chrome中出现以下错误: NonESPMessageInterface--NonESPMessageInterface.js:8 TypeError:无法读取null的属性“insertBefore”-angular.js:13708 检查表消息无效,来自源站#{e.origin}:MessageEventbubbles:falsecancelBubble:FalseConcelable:FalseComposition:falsecurrentTarg

我正在使用浏览器同步运行Gulp,并在Chrome中出现以下错误:

NonESPMessageInterface--NonESPMessageInterface.js:8

TypeError:无法读取null的属性“insertBefore”-angular.js:13708

检查表消息无效,来自源站#{e.origin}:MessageEventbubbles:falsecancelBubble:FalseConcelable:FalseComposition:falsecurrentTarget:Windowdata:ObjectdefaultPrevented:falseeventPhase:0信任:truelastEventId:“源站:”路径:阵列(1)端口:阵列(0)returnValue:truesource:WindowsrcElement:Windowtarget:WindowtimeStamp:4354.4键入:“message”proto:MessageEvent---nonEspMessageInterface.js:53

我的gulp.js文件如下所示:

//必需
var gulp=需要('gulp'),
autoprefixer=require('gulp-autoprefixer'),
browserSync=require('browser-sync'),
stream=browserSync.stream,
cleanCSS=require('gulp-clean-css'),
concat=require('gulp-concat'),
cssnano=需要('gulp-cssnano'),
del=需要('del'),
imagemin=require('gulp-imagemin'),
ngAnnotate=require('gulp-ng-annotate'),
订单=要求('gulp-order'),
管道工=需要(“管道工”),
打印=需要('gulp-print'),
重命名=需要('gulp-rename'),
sass=require('gulp-sass'),
sourcemaps=require('gulp-sourcemaps'),
uglify=需要('gulp-uglify');
var devDir='main/app/';
var distDir='主/区';
变量路径={
scriptsApp:devDir+'scripts/*.js',
ScriptsModule:devDir+'scripts/*/*.js',
sassApp:devDir+'styles/scss/*.scss',
sasspatials:devDir+'styles/scss/***.scss',
sassToCss:devDir+'styles/css',
css:devDir+'style/css/*.css',
索引:“main/templates/*.html”,
html:devDir+'templates/***.html',
htmlPress:devDir+'templates/***/***/.html'
};
//sass任务
gulp.task('sass',function(){
return gulp.src([path.sassApp,path.sasspatials])
.pipe(sourcemaps.init())
.管子(管道工())
.pipe(sass().on('error',sass.logError))
.管道(大口目的地(路径sassToCss))
.pipe(流({once:true}));
//调用css任务
完成();
});
//css任务
gulp.task('minify-css',['sass'],function()){
return gulp.src([path.css])
.pipe(sourcemaps.init())
.管子(管道工())
.pipe(autoprefixer(“上两个版本”))
.pipe(cleanCSS({compatibility:'ie8'}))
.pipe(重命名('style.min.css'))
.pipe(sourcemaps.write('.'))
.管道(大口目的地(distDir))
.pipe(流({once:true}));
});
//脚本任务
gulp.task('scripts',function()){
返回gulp.src([path.scriptsApp,path.scriptsModule])
.pipe(sourcemaps.init())
.管子(管道工())
.pipe(订单(['app.js',devDir+'scripts/services/*.js']))
.pipe(ngAnnotate())
.pipe(丑陋({mangle:false}))
.pipe(concat('all.js'))
.pipe(重命名({后缀:'.min'}))
.pipe(sourcemaps.write('.'))
.管道(大口目的地(distDir))
.pipe(流({once:true}));
});
//html任务
gulp.task('html',function(){
return gulp.src([path.index,path.html,path.htmlPress])
.pipe(流({once:true}));
});
//图像任务-压缩图像
gulp.task('images',function(){
gulp.src('main/app/assets/img/***'))
.pipe(imagemin())
.管道(大口目的地(“主/应用/资产/img/压缩”);
});
//浏览器同步任务
gulp.task('browser-sync',function()){
浏览器同步({
代理:“本地主机:8088”
});
});
//清洁任务
吞咽任务('clean',函数(){
返回del(['main/dist/*'、'!main/dist/ext'、'!main/dist/assets']);
});
//监视任务
吞咽任务('watch',function(){
gulp.watch([path.scriptsApp,path.scriptsModule],'scripts']);
狼吞虎咽地看([path.sassApp,path.sasspatials],'sass']);
watch([path.css],'minify-css']);
watch([path.index,path.html],'html']);
});
//默认任务
gulp.task('default',['clean',function()){
gulp.start('sass','minifycss','scripts','html','browser sync','watch');

});此错误是由Litmus Chrome扩展引起的。删除扩展和浏览器同步功能


您是否对错误进行过研究或尝试过可能的解决方案?@TimHutchison-是的,但没有关于错误的搜索结果。