-
Maybe this helps someone to save some time: Unexpected end of JSON input |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
From the question, seperate this part:
Then, reply to yourself with this part and mark as an answer for others to refer to. |
Beta Was this translation helpful? Give feedback.
-
Turns out, this error happens when you pass an empty file into
To fix it you just need to put "{ }" in the file "contractAddresses.json" in the frontend project |
Beta Was this translation helpful? Give feedback.
Turns out, this error happens when you pass an empty file into
const contractAddresses = JSON.parse(fs.readFileSync(FRONT_END_ADDRESSES_FILE, "utf8"))
To fix it you just need to put "{ }" in the file "contractAddresses.json" in the frontend project