-
Notifications
You must be signed in to change notification settings - Fork 14
Cannot read property 'type' of undefined #53
Comments
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 --- CURRENTLY SEEKING WORK IN MELBOURNE OR REMOTE! On 19 October 2016 at 05:51, Erin Giglio [email protected] wrote:
|
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? |
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.
The text was updated successfully, but these errors were encountered: