[15:50:37] Using gulpfile /jenkins/workspace/Dev_WEB/gulpfile.js
[15:50:37] Starting 'build'...
[15:50:37] Starting 'clean'...
[15:50:37] 'clean' errored after 4.8 ms
[15:50:37] TypeError: Cannot read property 'length' of undefined
at flattenGlob (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_module s/glob2base/index.js:9:25)
at setToBase (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/ glob2base/index.js:48:12)
at module.exports (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_mod ules/glob2base/index.js:56:19)
at Object.gs.createStream (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/ index.js:34:42)
at Object.gs.create (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/index. js:68:42)
at Gulp.src (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/vinyl-fs/lib/src/index.js:33:23)
at Gulp.<anonymous> (/jenkins/workspace/Dev_WEB/gulpfile.js:490:17)
at module.exports (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/jenkins/workspace/Dev_WEB/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
clean是清除当前目录下面dist文件夹
//清除dist文件夹
gulp.task('clean', function() {
return gulp.src('dist', {
read: false
})
.pipe(clean());
});
在本地没有问题 这是在公司的linux服务器上出现的错误 有没有大神遇到过同样的错误 请指点一下 thanks…