Heap out of memory `memoryLimit` issue in ForkTsCheckerWebpackPlugin
See original GitHub issueCurrent behavior
Upgraded to start using electron-webpack and upgraded all our packages to newer versions.
Expected behavior
Typescript and webpack should compile code
Steps to reproduce the issue
use electron webpack with typescript?
Issue reproduction repository
Environment
- fork-ts-checker-webpack-plugin: [version from the
package.json] in node modules under /electron-webpack-ts/package.json fork-ts-checker-webpack-plugin: 0.5.2 - typescript: [version from the
package.json] typescript: 3.4.5 - tslint: [version from the
package.json] “tslint”: “^5.14.0”, - webpack: [version from the
package.json] “webpack”: “4.28.4” - os: [e.g. Ubuntu 19.04] Ubuntu 18.04
<--- Last few GCs --->
[8366:0x3f04ad0] 23325 ms: Mark-sweep 2042.0 (2085.7) -> 2041.3 (2086.2) MB, 734.9 / 0.0 ms (average mu = 0.102, current mu = 0.013) allocation failure scavenge might not succeed
[8366:0x3f04ad0] 24138 ms: Mark-sweep 2043.2 (2086.2) -> 2042.5 (2087.2) MB, 807.7 / 0.0 ms (average mu = 0.055, current mu = 0.007) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x309d6aa5be1d]
1: StubFrame [pc: 0x309d6aa5d1df]
Security context: 0x124119b1e6e9 <JSObject>
2: getIntersectionType(aka getIntersectionType) [0x1a0a8652b3a1] [/home/marcus/work/ClientElectron/node_modules/typescript/lib/typescript.js:~39985] [pc=0x309d6b65f1d2](this=0x0d5af00026f1 <undefined>,types=0x3352c04a57b9 <JSArray[23]>,aliasSymbol=0x0d5af00026f1 <undefined>,aliasTypeArguments=0x0d5af00026f1 <undefine...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x8dc510 node::Abort() [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
2: 0x8dc55c [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
3: 0xad9b5e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
4: 0xad9d94 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
5: 0xec7bf2 [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
6: 0xec7cf8 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
7: 0xed3dd2 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
8: 0xed4704 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
9: 0xed7371 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
10: 0xea07f4 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
11: 0x114018e v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/home/marcus/.nvm/versions/node/v10.15.3/bin/node]
12: 0x309d6aa5be1d
Error from running electron-webpack dev
┏ Renderer -------------------
Type checking and linting aborted - probably out of memory. Check `memoryLimit` option in ForkTsCheckerWebpackPlugin configuration.
┗ ----------------------------
┏ Main -----------------------
Type checking and linting aborted - probably out of memory. Check `memoryLimit` option in ForkTsCheckerWebpackPlugin configuration.
┗ ----------------------------
Issue Analytics
- State:
- Created 4 years ago
- Comments:40 (10 by maintainers)
Top Results From Across the Web
webpack - Typescript and nuxt memory leak with ...
Issues checking service aborted - probably out of memory. Check the memoryLimit option in the ForkTsCheckerWebpackPlugin configuration.
Read more >2010342 – Local console builds can have out of memory errors
Running local builds can result in the following error (both `yarn run build` and `yarn run dev`): Type checking and linting aborted -...
Read more >Webpack: How to fix "Heap out of memory - m4x
Let's try patching it. To "fix" this, a quick google search will suggest you increase this limit by setting a different memory limit....
Read more >How to resolve the memory heap out issue in React App
This section provides the information on resolving the memory heap out issue for React application of Bold reports.
Read more >Possible memory leak after upgrade to Storybook 6.5.10 #18971
Issues checking service aborted - probably out of memory. Check the `memoryLimit` option in the ForkTsCheckerWebpackPlugin configuration.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It should be the problem of this. https://github.com/microsoft/TypeScript/issues/31227
use
npm i typescript@3.3.4000to solve the problemI’m considering a
skipLibChecktattoo. Or I would be if I wasn’t already filled with regret about thenoImplicitAnyone I got one drunken night in 2014