我突然收到以下错误
Exception from sub xGHk6PkFTQ9uv8ncg TypeError: Cannot call method 'find' of undefined
at null._handler (app/server/publications.js:6:22)
at maybeAuditArgumentChecks (packages/livedata/livedata_server.js:1349)
at _.extend._runHandler (packages/livedata/livedata_server.js:796)
at _.extend._startSubscription (packages/livedata/livedata_server.js:690)
at _.extend.protocol_handlers.sub (packages/livedata/livedata_server.js:508)
at packages/livedata/livedata_server.js:472
publications.js
第6行的代码是:
Meteor.publish('users', function() {
return Meteor.users.find( {}, {fields:{'age': 1}} )
});
为什么会导致错误,我们如何解决?
答案 0 :(得分:1)
发现accounts-password
突然失踪,造成了这个问题。