2016-10-27 3 views
1

내가 각도-CLI github page에서각도-CLI 구문 오류가 발생

$ ng new scotchy-scotch 
C:\Users\....\AppData\Roaming\nvm\v0.12.10\node_modules\angular-cli\bin\ng:7 
const resolve = require('resolve'); 
^^^^^ 
SyntaxError: Use of const in strict mode. 
    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 Function.Module.runMain (module.js:501:10) 
    at startup (node.js:129:16) 
    at node.js:814:3 

답변

2

를 실행할 때이 오류가 그러나 각-CLI 프로젝트를 사용하는 것을 시도하고있다 :

전제 조건 :

CLI와 생성 된 프로젝트는 모두 함께 NPM 3 이상과 노드 4 이상이 필요 종속 을 보유하고 있습니다. (사용 일) nodejs v0.12에서 기본적으로 사용할 수 없습니다

const는 ES6 (2015 ECMA 스크립트)의 일부입니다. Related stackoverflow article

관련 문제