2016-10-12 3 views
2

Versuchen folgenden Befehl ausführen für AOT implementieren in angular2Erste Fehler beim Durchlauf Winkel/Compiler-cli Befehl

npm install @angular/compiler-cli [email protected] @angular/platform-server @angular/compiler 

aber gibt mir Fehler, auch können Sie mich Schritt für Schritt geben, wie ich die Anwendung kompilieren für AOT

, wie auch ich kann laufen die node_modules/.bin/ngc -p TSconfig-aot.json Befehl

UNMET PEER DEPENDENCY [email protected] invalid 
npm WARN @angular/[email protected] requires a peer of [email protected]^2.0.2 but none was installed. 
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of [email protected]^2.0.2 but none was installed. 
+0

Folgen Sie den Schritten von https://angular.io/docs/ts/latest/cookbook/aot-compiler.html – Ar123

Antwort

1

Dieser Fehler wird durch unerfüllte Abhängigkeiten verursacht wird. Sie sollten eine neuere Version von angular2 installieren. Danach führen Sie den Befehl erneut aus. Durchsuchen Sie den Stammpfad Ihres Projekts und führen Sie den folgenden Befehl aus.

node_modules/.bin/ngc -p tsconfig-aot.json 

Sie können eine detaillierte Erklärung von here erhalten.