我最近将我的meteor应用程序更新为0.6.5,我注意到下划线包不再工作了。 错误日志是:
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
感谢您的帮助
答案 0 :(得分:7)
如果您正在使用大气(即mrt)软件包,则可能需要降级到0.6.4.1,直到软件包作者有机会更新为0.6.5的新软件包API。您可以在此处找到相关说明 - https://groups.google.com/d/topic/meteor-talk/BbrjGcGGIzc/discussion
希望有所帮助!
答案 1 :(得分:1)
看起来您(或其他人的)meteor-file.js
包需要为下划线注册显式依赖项。这自动包含在0.6.5之前的版本中。在package.js
中添加以下内容:
Package.on_use(function (api) {
api.use('underscore', 'server');
});