为什么要“大笑"?失败:“请使用--harmony标志运行节点!"? [英] Why "gulp-jest" is failing with: "Please run node with the --harmony flag!"?

查看:123
本文介绍了为什么要“大笑"?失败:“请使用--harmony标志运行节点!"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行gulp test时出现以下错误:

Error: Please run node with the --harmony flag!

这是我的大任务:

var jest = require('gulp-jest');

gulp.task('test', function() {
  return gulp.src('src/**/__tests__').pipe(jest({
    rootDir: 'src',
    scriptPreprocessor: '../node_modules/6to5-jest',
    unmockedModulePathPatterns: [ 'react' ]
  }));
});

要复制: https://github.com/SEEK-Jobs/react-playground

请注意,npm test正常运行(测试按预期失败),但是gulp test失败,并显示上述错误. npm testgulp test都具有相同的配置对象:

Note that npm test works properly (test is failing as expected), but gulp test fails with the error above. Both npm test and gulp test have the same config object:

{
  rootDir: 'src',
  scriptPreprocessor: '../node_modules/6to5-jest',
  unmockedModulePathPatterns: [ 'react' ]
}

我在做什么错了?

推荐答案

这是gulp-eslint中的错误,现已在0.3.0版中修复.

It was a bug in gulp-eslint, and it is fixed now in version 0.3.0.

这篇关于为什么要“大笑"?失败:“请使用--harmony标志运行节点!"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆