Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript and nuxt memory leak with ForkTsCheckerWebpackPlugin

I am trying to use typescript with nuxt but am getting the following issue when the site reloads in dev

Issues checking service aborted - probably out of memory. Check the memoryLimit option in the ForkTsCheckerWebpackPlugin configuration. If increasing the memory doesn't solve the issue, it's most probably a bug in the TypeScript or EsLint.

Is there anyway to increase this in nuxt config?

like image 981
AlexanderDavidson Avatar asked Jul 01 '26 20:07

AlexanderDavidson


1 Answers

// In your webpack.config.js file

const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");

module.exports = {
  ...,
  plugins: [
    ...,
    new ForkTsCheckerWebpackPlugin({
      typescript: {
        memoryLimit: 4096,
      },
    }),
  ],
}
like image 169
sgedye Avatar answered Jul 03 '26 10:07

sgedye



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!