2017-07-26 15 views
0

私は角度cliを使用しています。私はerror.Please助け以下ng serve --aot IAM gtteingを使用すると、私のCLI情報JavaScriptヒープ角2のメモリが不足しています

@angular/cli: 1.2.1 
node: 6.10.0 
os: win32 x64 
@angular/animations: 4.1.1 
@angular/common: 4.0.0 
@angular/compiler: 4.0.0 
@angular/compiler-cli: 4.0.0 
@angular/core: 4.0.0 
@angular/forms: 4.0.0 
@angular/http: 4.0.0 
@angular/platform-browser: 4.0.0 
@angular/platform-browser-dynamic: 4.0.0 
@angular/router: 4.1.1 

を確認してください!

< ---最後のいくつかのGC --->

893427ミリ秒:マーク・スイープ1344.1(1434.3) - > 1339.9(1434.3)MB、925.7/0.0 msの[割り当ての失敗] [古い空間でのGC要求された]。 894468 ms:マークスイープ1339.9(1434.3) - > 1339.9(1434.3)MB、1040.5/0.0 ms [割り当て失敗] [要求された古い領域のGC] 895402 ms:マークスイープ1339.9(1434.3) - > 1339.6(1418.3)MB、933.7/0.0ミリ秒[最後の手段gc]。 896331 ms:マークスウィープ1339.6(1418.3) - > 1339.8(1418.3)MB、928.1/0.0 ms [最終手段gc]。

< --- JSスタックトレース--->

==== JSスタックトレース========================= =================

セキュリティコンテキスト:000001AF8A2CFB61 2:/ * anonymous */[C:\ project_folder \ node_modules \ source-map \ lib \ source-node。 JS:100] [PC = 0000016E99866533] 3(これは00000346870554E1、マッピング= 000003C18FDC93C9 =):引数アダプタフレーム:3-> 1 4:FATAL InnerArrayForEach(別名InnerArrayForEach)[ネイティブarray.j ...

をエラー: CALL_AND_RETRY_LASTの割り当てに失敗しました - ファイルを修正し、次にその内容を置き換えよう

+1

再び通常振る舞う私は '--max_old_space_size'を設定すると、あなたがこのスレッドにもhttps://github.com/angular/angular-cli/issuesを見るのを助けるべきだと思います/ 5618 – yurzui

+0

また、https://stackoverflow.com/questions/41955769/angular-2-aot-error-fatal-error-call-and-retry-last-allocation-failed-javasc、https://stackoverflow.com/questions/41517738/angular-cli-javascript-heap-out-of-memory-on-asset最適化 – echonax

+0

私はすべて試しました。しかし、私は同じエラーが発生しています。助けてください!!! – user3541485

答えて

0

メモリのうちJavaScriptのヒープ:(フォルダ内:node_modules \ bin)に

変更はng.cmd:

@IF EXIST "%~dp0\node.exe" (
    "%~dp0\node.exe" --max_old_space_size=5048 "%~dp0\..\angular-cli\bin\ng" %* 
) ELSE (
    @SETLOCAL 
    @SET PATHEXT=%PATHEXT:;.JS;=;% 
    node --max_old_space_size=5048 "%~dp0\..\angular-cli\bin\ng" %* 
) 

変更はngc.cmd:

@IF EXIST "%~dp0\node.exe" (
    "%~dp0\node.exe" --max_old_space_size=5048 "%~dp0\..\@angular\compiler-cli\src\main.js" %* 
) ELSE (
    @SETLOCAL 
    @SET PATHEXT=%PATHEXT:;.JS;=;% 
    node --max_old_space_size=5048 "%~dp0\..\@angular\compiler-cli\src\main.js" %* 
) 
+0

まだ同じエラーが発生しています – user3541485

0

を私は

を持っていた私のtsconfig.jsonで同じ問題 を持っていました

"include": [ "**/*" ],

これには、削除した後、NGビルドは

関連する問題