0

这是我的 gulpfile:

/*jslint maxlen:160*/
 (function (require) {
   "use strict";
   var gulp, tslint;
   gulp   = require('gulp');
   tslint = require('gulp-tslint');
   gulp.task("tslint", function() {
    return gulp.src(["src/**/*.ts"])
               .pipe(tslint())
               .pipe(tslint.reporter("verbose"));
   });
 }(require));

当我从命令行运行时gulp tslint,出现此错误:

[17:26:58] 使用 gulpfile /var/www/tests/gulp_error/gulpfile.js [17:26:58] 开始 'tslint'... [17:26:58] 'tslint' 在 6.08 毫秒后出错 [ 17:26:58] TypeError: undefined is not a function at Gulp。(/var/www/tests/gulp_error/gulpfile.js:9:36) 在 module.exports (/var/www/tests/gulp_error/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)在 Gulp.Orchestrator._runTask (/var/www/tests/gulp_error/node_modules/gulp/node_modules/orchestrator/index.js:273:3) 在 Gulp.Orchestrator._runStep (/var/www/tests/gulp_error/node_modules/ gulp/node_modules/orchestrator/index.js:214:10) 在 Gulp.Orchestrator.start (/var/www/tests/gulp_error/node_modules/gulp/node_modules/orchestrator/index.js:134:8) 在 /home/用户名/.nvm/versions/node/v0.12.12/lib/node_modules/gulp/bin/gulp.js:129:

我在这里做错了什么?这是带有代码的Github 存储库

4

0 回答 0