I’ve been using lodash as a global import in my project, like this:
_ = require('lodash')
It’s been working fine until now. But after I upgraded to 1.6 I’m getting a ton of cannot read property 'includes' of undefined etc. And if I check _ in the Meteor shell it’s undefined
On the client it works though, the problem is only on the server side
I also tried
lodash = require('lodash')
_ = lodash
In the Meteor shell, lodash works but _ is undefined.
haha same problem here!
What do you mean exactly @herteby?
Remove all the @-version- Strings in the .meteor/packages file and then just run meteor update?
That’s it? Gotta try that.
I noticed this and reported it in early alpha 1.6. It seemed to happen to me only when the Meteor shell was opened. It seems like Meteor shell overwrites the _ global variable on the server as well.
I am 90% sure that when I posted my own thread some days ago the error occured immediately before opening the shell. Only afterwards I opened the shell and began to debug - I usually work without any open meteor shell.
After the first error I first tried to console.log(_) in my imports/startup/server/index.js and only then opened the meteor shell. so yeah …