安装 使用vue时出现的错误

C:\Users\admin\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init:60
let template = program.args[0]
^^^


SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    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 Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3


C:\Users\admin>vue  init webpaback my
C:\Users\admin\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init:60
let template = program.args[0]
^^^


SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    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 Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)

    at node.js:968:3


查过资料 发现是 node版本太低


应该将其升级到 6以上

你可能感兴趣的:(安装 使用vue时出现的错误)