awwx / meteor-offline-data

Meteor offline data project.
MIT License
111 stars 9 forks source link

Release 0.0.3 broken with latest version of Meteorite #20

Closed belisarius222 closed 11 years ago

belisarius222 commented 11 years ago

Hey Andrew,

I git cloned the meteor-offline-todos repo, did mrt install, and ran it (on OS X in up-to-date Chrome with Meteor 0.6.4 and Meteorite 0.6.6). It reported two meaningful errors, both of which seem to be the result of Offline._broadcast being undefined.

I'm posting this issue here instead of at the todos repo, because it looks like the problem is with the library itself. Here's the console output:

Uncaught TypeError: Cannot call method 'listen' of undefined (windows.litcoffee.js:50) Uncaught TypeError: Cannot call method 'listen' of undefined (agent.litcoffee.js:67) Uncaught TypeError: undefined is not a function (todos.js:5)

I'm pretty sure that the first two errors caused the third. My initial guess here was that the if statement near the beginning of broadcast.litcoffee is preventing Offline._broadcast from being defined, which then throws errors later when other things call that.

I then tried running Meteor with a settings file with public.offlineData.disableWorker set to true to test this hypothesis, though, and it still got the same errors, so maybe the cause is something else.

Hope this is helpful, Ted

awwx commented 11 years ago

Ah, I've managed to confuse later versions of Meteorite somehow: when you add the offline-data package, Meteorite symlinks to the worker sub-package inside of offline-data instead of to the parent offline-data directory. (I didn't notice because I was using an earlier version of Meteorite...)

awwx commented 11 years ago

OK, try it with 0.0.4 now :)

belisarius222 commented 11 years ago

Works like a charm, thanks!

(sorry for the late response, I was on vacation)