Differential / meteor-workers

Spawn headless worker meteor processes to work on async jobs.
80 stars 9 forks source link

obj has no method 'endsWith' #2

Open LarsBuur opened 9 years ago

LarsBuur commented 9 years ago

Just added differential:workers

the package starts by reporting: MASTER: Requeued 0 jobs.

and then throws this error three times:

 TypeError: Object function (obj) {                                                                                // 48
     if (obj instanceof _) return obj;                                                                    // 49
     if (!(this instanceof _)) return new _(obj);                                                         // 50
     this._wrapped = obj;                                                                                 // 51
   } has no method 'endsWith'
     at packages/differential:workers/lib/init.coffee:13:23
     at Function._.each._.forEach (packages/underscore/underscore.js:113:1)
     at withJobs (packages/differential:workers/lib/init.coffee:12:5)
     at Package (packages/differential:workers/lib/init.coffee:89:7)

the source in /lib/init.coffee line 13 says:

cb(val, key) if _.endsWith(key, "Job") and key isnt "Job"

the problem is that my version of underscore does not include endsWith and http://underscorejs.org/ does not defined it either.

schnie commented 9 years ago

Thanks for letting me know! I'll address it in the next release, which will probably be pretty soon. Until then you can add the underscore string package to your app. meteor add wizonesolutions:underscore-string.

https://atmospherejs.com/wizonesolutions/underscore-string

On Mon, Dec 15, 2014 at 5:08 AM, Lars Buur notifications@github.com wrote:

Just added differential:workers

the package starts by reporting: MASTER: Requeued 0 jobs.

and then throws this error three times:

´´´ TypeError: Object function (obj) { // 48 if (obj instanceof

) return obj; // 49 if (!(this instanceof )) return new _(obj); // 50 this.wrapped = obj; // 51 } has no method 'endsWith' at packages/differential:workers/lib/init.coffee:13:23 at Function..each..forEach (packages/underscore/underscore.js:113:1) at withJobs (packages/differential:workers/lib/init.coffee:12:5) at Package (packages/differential:workers/lib/init.coffee:89:7) ´´´ the source in /lib/init.coffee line 13 says: ´´´ cb(val, key) if .endsWith(key, "Job") and key isnt "Job" ´´´ the problem is that my version of underscore does not include endsWith and http://underscorejs.org/ does not defined it either.

— Reply to this email directly or view it on GitHub https://github.com/Differential/meteor-workers/issues/2.

mxab commented 9 years ago

this https://github.com/Differential/meteor-workers/pull/14 should fix this issue