Skip to content

JSON Server Not Loading with 700 MB JSON File #529

Open
@ilovmylord

Description

@ilovmylord

Hi All,

We have a JSON File which is around 700 MB.
We are trying to restart JSON Server with watching this file.
An error is thrown as below

buffer.js:496
throw new Error(‘“toString()” failed’);
^

Error: “toString()” failed
at Buffer.toString (buffer.js:496:11)
at Object.fs.readFileSync (fs.js:553:33)
at Object.read (/usr/local/lib/node_modules/json-server/node_modules/lowdb/lib/file-sync.js:15:21)
at LodashWrapper.db.read (/usr/local/lib/node_modules/json-server/node_modules/lowdb/lib/_index.js:36:29)
at module.exports (/usr/local/lib/node_modules/json-server/node_modules/lowdb/lib/_index.js:96:15)
at low (/usr/local/lib/node_modules/json-server/node_modules/lowdb/lib/index.node.js:12:10)
at module.exports (/usr/local/lib/node_modules/json-server/lib/cli/utils/load.js:36:17)
at start (/usr/local/lib/node_modules/json-server/lib/cli/run.js:119:5)
at module.exports (/usr/local/lib/node_modules/json-server/lib/cli/run.js:156:3)
at module.exports (/usr/local/lib/node_modules/json-server/lib/cli/index.js:76:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions