Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_.endsWith exception when initializing #8

Open
slowdownitsfine opened this issue Mar 26, 2015 · 2 comments
Open

_.endsWith exception when initializing #8

slowdownitsfine opened this issue Mar 26, 2015 · 2 comments

Comments

@slowdownitsfine
Copy link
Contributor

Hi,

I'm loving the Meteor Workers and the simplicity behind them!

However during the startup of Meteor (1.0.4.2), after adding differential:workers to packages I was getting the following exception trace (edited):

...
Object function (obj) {
W20150326-19:53:41.929(1)? (STDERR)     if (obj instanceof _) return obj;
W20150326-19:53:41.929(1)? (STDERR)     if (!(this instanceof _)) return new _(obj);
W20150326-19:53:41.929(1)? (STDERR)     this._wrapped = obj;
W20150326-19:53:41.929(1)? (STDERR)   } has no method 'endsWith' date=Thu Mar 26 2015 19:53:41 GMT+0100 (CET), pid=65654, uid=501, gid=20, 
...
trace=[column=23, file=packages/differential:workers/lib/init.coffee, function=null, line=5, method=null, native=false, column=22
...

I didn't know _.endsWith() and didn't know that Underscore.string wasn't part of the standard Underscore distribution.

I found a workaround for this problem which consisted in adding underscorestring:underscore.string to packages and mapping the function under the globally exported s by the package to underscore like so:

_.endsWith = s.endsWith

Maybe this could be fixed by adding underscorestring:underscore.string to the dependencies of the package and changing the call to _.endsWith ... but that's just a suggestion :)

@schnie
Copy link
Contributor

schnie commented Mar 26, 2015

Yep, sounds like a good idea! Missed that!

On Thu, Mar 26, 2015 at 3:09 PM, Daniel Cusan [email protected]
wrote:

Hi,

I'm loving the Meteor Workers and the simplicity behind them!

However during the startup of Meteor (1.0.4.2), after adding
differential:workers to packages I was getting the following exception
trace (edited):

...
Object function (obj) {
W20150326-19:53:41.929(1)? (STDERR) if (obj instanceof _) return obj;
W20150326-19:53:41.929(1)? (STDERR) if (!(this instanceof _)) return new _(obj);
W20150326-19:53:41.929(1)? (STDERR) this._wrapped = obj;
W20150326-19:53:41.929(1)? (STDERR) } has no method 'endsWith' date=Thu Mar 26 2015 19:53:41 GMT+0100 (CET), pid=65654, uid=501, gid=20,
...
trace=[column=23, file=packages/differential:workers/lib/init.coffee, function=null, line=5, method=null, native=false, column=22
...

I didn't know _.endsWith() and didn't know that Underscore.string wasn't
part of the standard Underscore distribution.

I found a workaround for this problem which consisted in adding
underscorestring:underscore.string to packages and mapping the function
under the globally exported s by the package to underscore like so:

_.endsWith = s.endsWith

Maybe this could be fixed by adding underscorestring:underscore.string to
the dependencies of the package and changing the call to _.endsWith ...
but that's just a suggestion :)


Reply to this email directly or view it on GitHub
#8.

@slowdownitsfine
Copy link
Contributor Author

Sorry just saw #2 ...

@schnie schnie removed their assignment Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants