Was minding my own business, when this error happened, the server crashed and restarted and my file was wiped blank. Had to fetch backup to fix it (file was webjson.js). We should fix it and be way more robust to errors.
While loading metadata for /lib/js/webjson.js : Error: JSON Syntax Error
at /home/dom/tree/lib/driver.js:65:31
at [object Object].<anonymous> (fs.js:123:5)
at [object Object].emit (events.js:64:17)
at Object.oncomplete (fs.js:1190:12)
[Error: JSON Syntax Error]
http.js:536
throw new Error("Can't set headers after they are sent.");
^
Error: Can't set headers after they are sent.
at ServerResponse.setHeader (http.js:536:11)
at end (/home/dom/tree/node_modules/camp/lib/camp.js:437:17)
at /home/dom/tree/lib/plug.js:45:13
at Object.file (/home/dom/tree/lib/fs.js:109:5)
at end (/home/dom/tree/lib/plug.js:40:12)
at /home/dom/tree/lib/plug.js:171:40
at /home/dom/tree/lib/fs.js:288:7
at /home/dom/tree/lib/fs.js:208:7
at [object Object].<anonymous> (fs.js:123:5)
at [object Object].emit (events.js:64:17)
Was minding my own business, when this error happened, the server crashed and restarted and my file was wiped blank. Had to fetch backup to fix it (file was webjson.js). We should fix it and be way more robust to errors.