question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ForkTsCheckerWebpackPlugin Configuration

See original GitHub issue

Currently, ForkTsCheckerWebpackPlugin is enabled when TypeScript is enabled.

While building, the service is run for each build, breaking the build when enough endpoints are defined:

Starting type checking service...
Starting type checking service...
Starting type checking service...
(node:6910) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit

I would suggest a configuration option to not run ForkTsCheckerWebpackPlugin on build or to somehow run it before building.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
ashutoshkmrcommented, Jan 3, 2021

Hey @jayair I’ve created a PR to make ForkTsChecker an option

1reaction
MarZabcommented, Sep 10, 2020

I tried on my project, and it did complete while also showing the memory leak.

But it took a lot longer so I did some testing. I added an option to disable forktschecker here.

Config Build Time System Load
tsForkTsChecker: false serializedCompile: false 69.41s 10
tsForkTsChecker: true serializedCompile: true 375.33s 21
tsForkTsChecker: true serializedCompile: false frooze 427
tsc --noEmit 20.25s 7

My solution for now is to not use serializedCompile and to disable tsForkTsChecker compile time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fork-ts-checker-webpack-plugin - npm
Runs typescript type checker and linter on separate process.. Latest version: 7.2.14, last published: 14 days ago.
Read more >
Heap out of memory memoryLimit issue in ... - GitHub
ForkTsCheckerWebpackPlugin has been initialized using a configuration object that does not match the API schema. - configuration has an unknown ...
Read more >
How to use the fork-ts-checker-webpack-plugin.ONE_CPU ...
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. configFile: options. tsConfig, extensions, mainFields,...
Read more >
webpack - Typescript and nuxt memory leak with ...
Check the memoryLimit option in the ForkTsCheckerWebpackPlugin configuration. If increasing the memory doesn't solve the issue, ...
Read more >
Using TypeScript and ESLint with webpack (fork-ts-checker ...
... you supply to the plugin in your webpack.config.js to look something like this: new ForkTsCheckerWebpackPlugin({ eslint: true });.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found