user2497877
user2497877

Reputation: 31

Meteor 0.6.5 update: underscore error

I recently updated my meteor app to 0.6.5 and I noticed that the underscore package not working anymore. The error log is:

W20130814-20:31:26.431(-3)? (STDERR) /home/mariano/.meteor/tools/4010e5731d/lib/node_modules/fibers/future.js:173
W20130814-20:31:26.494(-3)? (STDERR)                        throw(ex);
W20130814-20:31:26.494(-3)? (STDERR)                              ^
W20130814-20:31:26.494(-3)? (STDERR) ReferenceError: _ is not defined
W20130814-20:31:26.496(-3)? (STDERR)     at Package (packages/meteor-file/meteor-file.js:92)
W20130814-20:31:26.496(-3)? (STDERR)     at packages/meteor-file.js:120:4
W20130814-20:31:26.496(-3)? (STDERR)     at packages/meteor-file.js:127:3
W20130814-20:31:26.496(-3)? (STDERR)     at mains (/home/mariano/borrar/blocnotas/.meteor/local/build/programs/server/boot.js:153:10)
W20130814-20:31:26.497(-3)? (STDERR)     at Array.forEach (native)
W20130814-20:31:26.497(-3)? (STDERR)     at Function._.each._.forEach (/home/mariano/.meteor/tools/4010e5731d/lib/node_modules/underscore/underscore.js:79:11)
W20130814-20:31:26.497(-3)? (STDERR)     at /home/mariano/borrar/blocnotas/.meteor/local/build/programs/server/boot.js:80:5

Thanks for your help

Upvotes: 3

Views: 1662

Answers (2)

Andrew Mao
Andrew Mao

Reputation: 36900

It looks like your (or someone else's) meteor-file.js package needs to register an explicit dependency for underscore. This was included automatically in versions prior to 0.6.5. Add the following in package.js:

Package.on_use(function (api) {
    api.use('underscore', 'server');
});

Upvotes: 1

yaliceme
yaliceme

Reputation: 121

If you're using an atmosphere (i.e. mrt) package, you may need to downgrade to 0.6.4.1 until the package author has had a chance to update to the new package API that is part of 0.6.5. You can find instructions here - https://groups.google.com/d/topic/meteor-talk/BbrjGcGGIzc/discussion

Hope that helps!

Upvotes: 7

Related Questions