首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GULP找不到模块

GULP找不到模块
EN

Stack Overflow用户
提问于 2015-09-25 12:37:33
回答 1查看 1.4K关注 0票数 1

这是我的gulpfile.js

代码语言:javascript
复制
var gulp = require( "gulp" ),
    traceur = require( "traceur" ),
    babel = require( "babel" ),
    plumber = require( "plumber" ),
    es6Path = "es6/*.js",
    compilePath = "es6/compiled";

gulp.task( "traceur", function () {
    gulp.src( [ es6Path ] )
        .pipe( plumber() )
        .pipe( traceur( { blockBinding: true } ) )
        .pipe( gulp.dest( compilePath + '/traceur' ) );
});

gulp.task( "babel", function () {
    gulp.src( [ es6Path ] )
        .pipe( plumber() )
        .pipe( babel() )
        .pipe( gulp.dest( compilePath + '/babel' ) );
});

gulp.task( "watch", function() {
    gulp.watch( [ es6Path ], [ "traceur", "babel" ] );
});

gulp.task( "default", [ "traceur", "babel", "watch" ] );

这是我的package.json文件。

代码语言:javascript
复制
{
  "name": "ES6Demos",
  "version": "1.0.0",
  "description": "Getting started wtih ES6 using gulp",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Vinayak Phal",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^3.9.0",
    "gulp-babel": "^5.2.1",
    "gulp-concat": "^2.6.0",
    "gulp-plumber": "^1.0.1",
    "gulp-traceur": "^0.17.1",
    "gulp-typescript": "^2.9.0",
    "gulp-uglify": "^1.4.1"
  }
}

安装了所有的依赖项和所有内容,但我仍然得到以下错误。

这不仅与traceur有关,还会给其他模块带来错误。无论哪一种都是在吞咽的时候。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-09-25 12:41:05

你需要“追踪员”。你得要求“酒鬼”。其他包裹也是一样的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32782406

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档