Closed creatrixtiara closed 7 years ago
unofficial fix: have found that if you go to /usr/local/lib/node_modules/todoist-habitrpg/habitSync.js, comment out lines 218-220 (the if(res.body.type) line from the error and the two lines immediately under it, and run it again, it'll work. thereafter it fixes the json fine and will have no issues afterwards.
not fluent enough in JS to fix it myself in the program per se, but that'll fix it without duplicating all your tasks. it seems to happen when someone completes a task in habitica before completing it in todoist, especially daily tasks.
I can't seem to find that file on my Mac - I go to /usr/local and there's no lib even. I'll try erasing the json file.
--- Tiara S. | Creatrix Tiara Creative producer, media-maker, artist, writer, activist, organiser, changemaker signs up for anything that looks interesting. http://creatrixtiara.com
CURRENTLY SEEKING WORK IN MELBOURNE OR REMOTE! Contact me for any opportunities, gigs, jobs, and so on related to arts, media, tech, education, community development, culture, or anything else where I may be useful.
On 19 October 2016 at 05:51, Erin Giglio notifications@github.com wrote:
unofficial fix: have found that if you go to /usr/local/lib/node_modules/todoist-habitrpg/habitSync.js, comment out lines 218-220 (the if(res.body.type) line from the error and the two lines immediately under it, and run it again, it'll work. thereafter it fixes the json fine and will have no issues afterwards.
not fluent enough in JS to fix it myself in the program per se, but that'll fix it without duplicating all your tasks. it seems to happen when someone completes a task in habitica before completing it in todoist, especially daily tasks.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kusold/todoist-habitrpg/issues/53#issuecomment-254603335, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFPO5WylbbHwtPsQBVWwV6YsVhxgMc9ks5q1RVGgaJpZM4KZUcQ .
Right, you have a mac! I've always run this thing on linux/cygwin systems. It might be a hidden file, or I might be wrong about the location on your system. There's got to be a node_modules folder with your npm modules SOMEWHERE on your file system, though; maybe try a search with hidden files checked for that folder?
Dupe of #44.
I just pushed a stop gap measure ( version 1.0.1). It's not completely fixed, but the process should stop crashing. I'm going to leave #44 open until it is truly fixed, but I'll close this issue.
I'm running into issues trying to sync my Todoist and Habitica via Terminal on Mac:
`/usr/local/lib/node_modules/todoist-habitrpg/habitSync.js:218 if(res.body.type == "daily") { ^
TypeError: Cannot read property 'type' of undefined at /usr/local/lib/node_modules/todoist-habitrpg/habitSync.js:218:20 at fn (/usr/local/lib/node_modules/todoist-habitrpg/node_modules/async/lib/async.js:638:34) at Immediate._onImmediate (/usr/local/lib/node_modules/todoist-habitrpg/node_modules/async/lib/async.js:554:34) at processImmediate as _immediateCallback`
both the command itself and 'sudo' command aren't working.