In our monorepo, we have 25k+ TS files, this leads to types.json weighing 700MB+ (trace.json is ~40MB).
It seems that readFile has a limit if 512 MB (0x1fffffe8 characters).
|
try { |
|
const json = await fs.promises.readFile(typesPath, { encoding: "utf-8" }); |
|
typesCache = JSON.parse(json); |
|
} |
|
catch (e) { |
|
console.error(`Error reading types file: ${e.message}`); |