vite-plugin-checker: Worker terminated due to reaching memory limit: JS heap out of memory

Describe the bug

Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory

image

Reproduction

current setting:

checker({
                terminal: true,
                vueTsc: true,
                typescript: false,
                eslint: {
                    lintCommand: 'eslint --format=pretty . --ext .js,.ts,.vue',
                },
                overlay:{
                    initialIsOpen: false,
                    position: 'bl'
                }
            }),

Expected behavior

no heap out of memory error, or ability to increase memory limit

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 11.24 GB / 31.92 GB
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 99.0.4844.82
    Edge: Spartan (44.22000.120.0), Chromium (99.0.1150.46)
    Internet Explorer: 11.0.22000.120
  npmPackages:
    vite-plugin-checker: ^0.4.4 => 0.4.4

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 28 (4 by maintainers)

Most upvoted comments

With that code change, it happened once after few hours usage image

Seems like it’s fixed in vue-tsc@0.33.9. Try it out 😃

I’ve been hitting this lately in my project, any way to increase the memory limit? I’m using the checker({ typescript: true }) config.

image

Please also track https://github.com/johnsoncodehk/volar/issues/1108, it is break changes but it will reduce a half of memory usage.

I got this error after upgrading a Quasar project to use vue-tsc / plugin checker.

Adding some missing excludes to tsconfig.json solved the out-of-memory error for me:

{
  "extends": "@quasar/app-vite/tsconfig-preset",
  "compilerOptions": {
    "baseUrl": "."
  },
  "exclude": [
    "./dist",
    "./.quasar",
    "./node_modules",
    "./src-capacitor",
    "./src-cordova",
    "./quasar.config.*.temporary.compiled*"
  ]
}

This problem should be fixed in vue-tsc v0.38.8.