At night under the Linux build environment, the code is good, gulp also in the global installed, according to the habit under windows, directly in the directory to Knock Gulp, the result throws an exception.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/AD/wKiom1XrDfrAPZ7sAAKhlJR5vNY011.jpg "title=" 2015-09-05 23:40:33 screen. png "alt=" wkiom1xrdfrapz7saakhljr5vny011.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/AE/wKiom1XrDtzwzlKsAADByLDRWaM251.jpg "title=" 2015-09-05 23:46:31 screen. png "alt=" wkiom1xrdtzwzlksaadbyldrwam251.jpg "/>
Beginning also thought is the authority problem, with sudo found useless, went to see Gulpfile.js, the content is as follows:
' Use strict '; Var gulp = require (' Gulp '); Var g = require (' Gulp-load-plugins ') ) ({lazy: false}); Var inject = require (' Gulp-inject ');var browsersync = Require (' Browser-sync '); Var connect = require (' Gulp-connect ');var historyapifallback = require (' Connect-history-api-fallback '); var reload = browsersync.reload;var config = { paths: { html: { src=\ ' #\ ' "/**/*.html"], dest: "Build" }, js: { src=\ ' #\ ' "/**/*.js", '!. /src/lib/angular.min.js ', '!. /src/lib/jquery.min.js ', '!. /src/js/aPp.js '], dest: "Build/js" }, css: { src=\ ' #\ ' "/css/**/*.css"], dest: "Build/css" }, assets: { src=\ ' #\ ' "/assets/**/*.png", "src/assets/**/*.jpg"], dest: "Build/assets" } }}//Packing configvar distconfig = { paths: { libjs: { src=\ ' #\ ' "/lib/angular.min.js", "Src/lib/jquery.min.js", "src/lib/ Angular-resource.min.js "," Src/lib/angular-ui-router.min.js "," Src/lib/highcharts-ng.js "," Src/lib/highcharts.js " , "Src/lib/smart-table.min.js", "Src/lib/ui-bootstrap-tpls-0.13.2.min.js"], }, appjs: { src=\ ' #\ ' "/js/app.js", "Src/services/mainservice.js", "src/coms/area/ Areactrl.js "," Src/coms/details/detailsctrl.js "," Src/coms/details/singlectrl.js "," Src/coms/home/homectrl.js "," Src/coms/rank/rankctrl.js "], }, css: { src=\ ' #\ ' "/css/bootstrap.min.css", "Src/css/details.css", "Src/css/font-awesome.min.css", "src/css/ Homepage.css ", " src/css/ranking.cSS ", " Src/css/single.css ", " Src/css/tarea.css "], dest: "Dist/css" }, assets: { src=\ ' #\ ' "/assets/**/*.png", "Src/assets/**/*.jpg"], dest: "Dist/assets"         } }} // Check Script gulp.task (' Jscheck ', function () {  GULP.SRC (CONFIG.PATHS.JS.SRC) .pipe (G.jshint ()) .pipe (g.jshint.reporter (' Default ');}); / merge, Compress js file gulp.task (' Minjs ', function () { gulp.src (CONFIG.PATHS.JS.SRC) .pipe (G.conCat (' App.js ')) .pipe (Gulp.dest ('./dist ')) .pipe (G.rename (' app.min.js ')) . Pipe (G.uglify ()) .pipe (Gulp.dest ('./dist ');}); / merge, compress css file gulp.task (' Mincss ', function () { gulp.src ( CONFIG.PATHS.CSS.SRC) .pipe (G.concat (' app.css ')) .pipe (Gulp.dest ('./dist ')) . Pipe (G.rename (' app.min.css ')) .pipe (G.cssmin ()) .pipe (Gulp.dest ('./dist ');}); / transfer index.html to TMP directory under Gulp.task (' HTML ', function () { gulp.src ('./src/ Index.html ') .pipe (g.rename (' tmp.html '))   &NBSp; .pipe (Gulp.dest ('./tmp ');}); / Packaging Gulp.task (' Dist ', function () { gulp.run ' Jscheck ', ' minjs ', ' Mincss ');}); / Default task Gulp.task (' Watch ', [' Inject '], function () { browsersync ({ notify: false, // Run as an https by uncommenting ' Https: true ' // Note: this uses an unsigned certificate which on first access // will present a certificate warning in the browser. // https: true, server: { basedir:[' src '], index: "Index.html",         MIDDLEware: [ historyapifallback ()] } }); // gulp.watch (config.paths.css.src, [' inject '); // gulp.watch (config.paths.js.src, [' Inject ']); gulp.watch ([config.paths.html.src,config.paths.css.src,config.paths.js.src], [' Inject ']); gulp.watch ([Config.paths.html.src, './src/index.html '], reload);}); / test Environment runs Gulp.task (' Server ', function () { connect.server ({ port: ', root: '. Src ', middleware: function (connect, opt) { return [ historyapifallback ({}) ]; } }); / inject css jsgulp.task (' inject ', function() { return gulp.src ('./src/index.html ') .pipe (Inject (GULP.SRC ( Config.paths.js.src, {read: false}), {ignorepath: ' src ')) .pipe ( Inject (GULP.SRC (Config.paths.css.src, {read: false}), {ignorepath: ' src '}) .pipe (Gulp.dest ('./src '))}) Gulp.task (' Default ', [' inject ', ' watch ']);
Found that there are many gulp.task, may be hit one of the task, throws an exception, so I try to Gulp Server,server is one of the task name, didn't think incredibly good.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/AA/wKioL1XrFieiNJTeAADqJS1lTdA792.jpg "title=" 2015-09-06 00:07:01 screen. png "alt=" wkiol1xrfieinjteaadqjs1ltda792.jpg "/>
Solve the problem of events.js:72 in Linux under Gulp