运行yo会产生无效的令牌错误。目前使用Node,NPM版本,如下所示。 节点-v V4.5.0 npm -v 2.15.9
$ yo
node_modules/yo/node_modules/yeoman-environment/lib/resolver.js
let lookup = path.join(...parts.slice(0, i + 1), 'node_modules');
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous>
答案 0 :(得分:1)
移动到节点-v v8.11.1和npm -v 5.6.0
后工作正常