elizabeth
elizabeth copied to clipboard
invalid document source @#[line:0,col:undefined] Please help, I got this to work once, but after reinstall, I get the same error...
Welcome to Elizabeth, your Moves.app exporter!
Using DayOneExport to export 7 days!
invalid document source @#[line:0,col:undefined]
TypeError: Cannot read property 'documentElement' of undefined at Object.parse (/Users/dan/Documents/elizabeth-master/node_modules/dayone/node_modules/plist/lib/parse.js:45:10) at DayOneEntry.fromOutputFormat as fromFile at /Users/dan/Documents/elizabeth-master/node_modules/dayone/lib/DayOne.js:49:19 at Array.forEach (native) at DayOne.list (/Users/dan/Documents/elizabeth-master/node_modules/dayone/lib/DayOne.js:47:30) at DefaultPlugin.loadEntries (/Users/dan/Documents/elizabeth-master/lib/output/DayOneExport.js:203:17) at DefaultPlugin.exportDay (/Users/dan/Documents/elizabeth-master/lib/output/DayOneExport.js:79:10) at /Users/dan/Documents/elizabeth-master/lib/Elizabeth.js:143:17 at Request._callback (/Users/dan/Documents/elizabeth-master/node_modules/moves-api/lib/MovesApi.js:126:13) at Request.self.callback (/Users/dan/Documents/elizabeth-master/node_modules/request/request.js:123:22)
I am experiencing this issue as well, exact same error.
This seems to be related to empty files lying in the DayOne entries directory: pwaldhauer/dayone#10
you can just find the DayOneEntry.js and remove the line
var entry = plist.parse(fs.readFileSync(filename, 'utf8'));
and then add below lines at the same place:
var file = fs.readFileSync(filename, 'utf8');
if (!file) {
return null;
}
var entry = plist.parse(file);