Recently, I updated my Ionic/Angular application to the latest versions. Here are some relevant details:
"@angular/*": "^16.1.1",
"@angular-eslint/builder": "16.0.3",
"@angular-eslint/eslint-plugin": "16.0.3",
"@angular-eslint/eslint-plugin-template": "16.0.3",
"@angular-eslint/schematics": "16.0.3",
"@angular-eslint/template-parser": "16.0.3",
"eslint": "^8.44.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "46.2.6",
"eslint-plugin-prefer-arrow": "1.2.3",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"eslint-config-prettier": "^8.8.0",
"ts-node": "~10.9.1",
"typescript": "^5.1.3",
I am using vscode with the ESLint extension (dbaeumer.vscode-eslint)
However, I encountered an error in the ESLint output without any linting:
[Info - 6:07:32 AM] ESLint server is starting.
[Info - 6:07:33 AM] ESLint server running in node v16.17.1
[Info - 6:07:33 AM] ESLint server is running.
[Info - 6:07:34 AM] ESLint library loaded from: C:\dev\myapp\node_modules\eslint\lib\api.js
<--- Last few GCs --->
[37792:00000138004CC000] 31705 ms: Scavenge 3937.6 (4076.3) -> 3936.2 (4077.1) MB, 4.3 / 0.0 ms (average mu = 0.850, current mu = 0.817) allocation failure;
[37792:00000138004CC000] 31717 ms: Scavenge 3938.3 (4077.1) -> 3937.1 (4078.6) MB, 4.1 / 0.0 ms (average mu = 0.850, current mu = 0.817) allocation failure;
[37792:00000138004CC000] 31732 ms: Scavenge 3939.9 (4078.6) -> 3938.5 (4088.1) MB, 4.5 / 0.0 ms (average mu = 0.850, current mu = 0.817) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
1: 00007FF6237416D6 node::Buffer::New+47862
2: 00007FF62374184D node::OnFatalError+317
3: 00007FF626146E13 v8::internal::WebSnapshotDeserializer::UpdatePointersCallback+787
4: 00007FF626146DA7 v8::internal::WebSnapshotDeserializer::UpdatePointersCallback+679
5: 00007FF6261BF067 v8::CppHeap::CollectGarbageInYoungGenerationForTesting+65495
6: 00007FF624F477B3 v8::CppHeap::GetHeapHandle+201107
7: 00007FF622518ACE v8::CppHeap::CollectStatistics+232910
8: 00007FF622518592 v8::CppHeap::CollectStatistics+231570
9: 00007FF622523232 v8::CppHeap::CollectStatistics+275762
10: 00007FF624822873 Cr_z_uncompress+2817971
11: 00007FF624822B82 Cr_z_uncompress+2818754
12: 00007FF622519583 v8::CppHeap::CollectStatistics+235651
13: 00007FF62250E63B v8::CppHeap::CollectStatistics+190779
14: 00007FF62250A194 v8::CppHeap::CollectStatistics+173204
15: 00007FF6224F945D v8::CppHeap::CollectStatistics+104285
16: 00007FF6224F6C87 v8::CppHeap::CollectStatistics+94087
17: 00007FF6224F4093 v8::CppHeap::CollectStatistics+82835
18: 00007FF624F27151 v8::CppHeap::GetHeapHandle+68401
19: 00007FF624F19090 v8::CppHeap::GetHeapHandle+10864
20: 00007FF62262308A v8::internal::TickSample::GetStackSample+114602
21: 00007FF5BFED7DBC
[Info - 6:08:07 AM] Connection to server got closed. Server will restart.
true
I saw suggestions for resolving similar errors by using --max-old-space
, but I'm unsure how to apply this to ESLint.
In other projects with the same setup, there were no issues. This project is slightly larger, but not significantly big.
What steps should I take to fix this problem?