2016-11-23 12 views
1

非常に基本的なアプリケーションでAoTコンパイルを実行しようとしていますが、Windowsでこのエラーが発生しています。開始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

あなたに助け無しに、これがWindowsに限定されるものではなく、私は、Linuxと同じになっている、と私は – paul

答えて

1

角度モジュール間のバージョン間の不一致が原因で、この問題が発生していると思います。

コンパイラ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

関連する問題