我正在尝试在Node + Express上加载一个非常大的JSON文件(360 Mb),但下面的行会返回此错误。那我该怎么处理呢?
var emails = require("../fake_IO/cleaned_data_lang.json");
错误:
Error: 'toString()' failed
at Buffer.toString (buffer.js:495:11)
at Object.fs.readFileSync (fs.js:552:33)
at Object.Module._extensions..json (module.js:585:20)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at loadEmails (C:\Users\me\Workspace\myProj\rules_handler\rules-ctrl.js:22:16)
at exports.executeRules (C:\Users\me\Workspace\myProj\rules_handler\rules-ctrl.js:12:51)