错误代码门户
Node.jsNode.js错误代码

ERR_FS_FILE_TOO_LARGE

fs file too large

代码 ERR_FS_FILE_TOO_LARGE · Node.js 报告的问题。

尝试读取大于 fs.readFile() 支持的 2 GiB 限制的文件。这不是 Buffer 的限制,而是内部 I/O 限制。要处理较大的文件,请考虑使用 fs.createReadStream() 分块读取文件。

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

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.

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。