Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Error reading types file: Cannot create a string longer than 0x1fffffe8 characters #10

Open
jakub-g opened this issue Nov 17, 2021 · 0 comments

Comments

@jakub-g
Copy link

jakub-g commented Nov 17, 2021

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}`);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant