Yesterday it was working perfectly fine and I wasn't getting this error.
Tried replacing a bunch of stuff with this one single line and I'm just flat out confused on why this is occurring. I've been researching this for an hour and all the results for 'Unexpected end of JSON input' don't really fully match what I'm doing and are incredibly confusing to me as I am fairly new to javascript.
Line that's causing it:
let userData = JSON.parse(fs.readFileSync(__dirname + '/Storage/userData.json', 'utf8'))
I should also point out that above the error it says what is causing it is 'undefined:1'??? So that's pretty weird. Normally it would show like the line in the javascript code but no, I had to search through the list of "at (something in some script)" to find what line was causing it, I have a feeling it might have to do with the JSON itself instead of my code.