我们有两个构建代理(Ubuntu 12.04),它们都安装了NodeJS 5和Gulp 3.9:
$ nodejs -v
v5.11.1
$ npm list | grep gulp
├─┬ gulp@3.9.1
但是在gulp build
期间 - 一个代理成功运行,而另一个 - 返回错误:
$ gulp build
/var/lib/go-agent/pipelines/Worker/gulpfile.js:3
let requireDir = require('require-dir');
^^^
SyntaxError: Unexpected strict mode reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/lib/node_modules/gulp/bin/gulp:19:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
这里可能有什么问题?