在运行gulp
getting started guide of Gulp on GitHub时出现此错误时,我一步一步跟踪at this point:
C:\dev\web\gulp_test\gulpfile.js:1
(function (exports, require, module, __filename, __dirname) { ��v
. ^
SyntaxError: Unexpected token ILLEGAL
. at Object.exports.runInThisContext (vm.js:76:16)
. at Module._compile (module.js:513:28)
. at Object.Module._extensions..js (module.js:550:10)
. at Module.load (module.js:458:32)
. at tryModuleLoad (module.js:417:12)
. at Function.Module._load (module.js:409:3)
. at Module.require (module.js:468:17)
. at require (internal/module.js:20:19)
. at execute (C:\Users\User\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned\^3.7.0\index.js:26:18)
. at Liftoff.handleArguments (C:\Users\User\AppData\Roaming\npm\node_modules\gulp-cli\index.js:173:63)
有什么问题?
gulpfile.js内容与指南中的内容相同
这里有一些平台规格
npm -v
):3.10.3 node -v
):v6.3.0 node -p process.versions
):v6.3.0 node -p process.platform
):win32 node -p process.arch
):x64 答案 0 :(得分:0)
似乎它没有特别的原因而失败。启动一个新项目可以解决问题。