2016-11-23 3 views
1

아주 기본적인 응용 프로그램에서 AoT 컴파일을 수행하려고하는데 Windows에서이 오류가 발생합니다. 각도 CLI를 사용하지 않았기 때문에 패키지가 누락되었습니다.Angular2 AoT 컴파일 오류 : createAotCompiler가 함수가 아닙니다.

> TypeError: compiler.createAotCompiler is not a function 
>   at Function.CodeGenerator.create (...\node_modules\@angular\compiler-cli\src\codegen.js:78:36) 

노드 버전을 시작 : 5.2.0

패키지

"dependencies": { 
    "@angular/common": "^2.2.1", 
    "@angular/compiler": "^2.2.1", 
    "@angular/compiler-cli": "^2.2.2", 
    "@angular/core": "^2.2.1", 
    "@angular/forms": "^2.2.1", 
    "@angular/http": "^2.2.1", 
    "@angular/platform-browser": "^2.2.1", 
    "@angular/platform-browser-dynamic": "^2.2.1", 
    "@angular/platform-server": "^2.2.2", 
    "@angular/router": "^3.2.1", 
    "@angular/upgrade": "^2.2.1", 
    "angular-in-memory-web-api": "^0.1.15", 
    "core-js": "^2.4.1", 
    "reflect-metadata": "^0.1.8", 
    "rxjs": "^5.0.0-rc.4", 
    "systemjs": "^0.19.41", 
    "zone.js": "^0.6.26" 
    }, 
    "devDependencies": { 
    "@types/core-js": "^0.9.34", 
    "@types/node": "^6.0.48", 
    "systemjs-builder": "^0.15.34", 
    "typescript": "^2.0.10" 
    } 
+0

당신에게 어떤 도움을하지만,이 창, 내가 리눅스와 같은지고있어, 나는이 나를 위해 그것을 고정 – paul

답변

1

각도 모듈 간 상호 종속성 때문에 버전이 일치하지 않아이 문제가 발생한다고 생각합니다.

종속성의 맨 위 부분은 compiler-cli 2.2.2 버전과 일치해야합니다.

"@angular/common": "^2.2.2", 
"@angular/compiler": "^2.2.2", 
"@angular/compiler-cli": "^2.2.2", 
"@angular/core": "^2.2.2", 
"@angular/forms": "^2.2.2", 
"@angular/http": "^2.2.2", 
"@angular/platform-browser": "^2.2.2", 
"@angular/platform-browser-dynamic": "^2.2.2", 
"@angular/platform-server": "^2.2.2", 
"@angular/router": "^3.2.2", 
"@angular/upgrade": "^2.2.2", 
+0

을 시작 각도 - CLI 사용 했는가에 한정되지 않고, – paul

관련 문제