Skip to content

doc: clarify ERR_FS_FILE_TOO_LARGE explanation to reflect fs.readFile() I/O limit #59050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1362,8 +1362,10 @@ Path is a directory.

### `ERR_FS_FILE_TOO_LARGE`

An attempt has been made to read a file whose size is larger than the maximum
allowed size for a `Buffer`.
An attempt was made to read a file larger than the supported 2 GiB limit for
`fs.readFile()`. This is not a limitation of `Buffer`, but an internal I/O constraint.
For handling larger files, consider using `fs.createReadStream()` to read the
file in chunks.

<a id="ERR_FS_WATCH_QUEUE_OVERFLOW"></a>

Expand Down
Loading