Error: Worker terminated due to reaching memory limit: JS heap out of memory
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
While building I am getting this error
```
DTS Build start
node:events:491
throw er; // Unhandled 'error' event
^
Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
at new NodeError (node:internal/errors:399:5)
at [kOnExit] (node:internal/worker:277:26)
at Worker..onexit (node:internal/worker:199:20)
Emitted 'error' event on Worker instance at:
at [kOnExit] (node:internal/worker:277:12)
at Worker..onexit (node:internal/worker:199:20) {
code: 'ERR_WORKER_OUT_OF_MEMORY'
}
Node.js v18.14.2
```
I feel there is some issue with my `tsconfig.json` Here is the link to the current `tsconfig` which causes this issue
https://github.com/WINOFFRG/limeplay/blob/c7b4342dc74cdbded43c0c39101eb8dd10bd98ac/packages/limeplay-core/tsconfig.json
Please check the root `tsconfig.json` as well! If I don't extend the root config to package config `./tsconfig.json` to `packages/limeplay-core/tsconfig.json` with the below config
```json
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": true,
"checkJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": false,
"noEmit": true,
"noEmitOnError": true,
"jsx": "react-jsx",
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"preserveConstEnums": true,
"typeRoots": ["./src/types"]
},
"include": ["src", "../../@types"],
"exclude": ["node_modules"]
}
```
The build succeeds but when extended with the config shared above in the URL, It fails. Here is the link to error from Actions
https://github.com/WINOFFRG/limeplay/actions/runs/4589372907/jobs/8104219650#step:4:224
Contributor guide
Assessment
This issue has not been assessed yet.