【发布时间】:2015-10-28 05:12:51
【问题描述】:
我已将流星升级到最新版本,但出现了问题。
启动流星时出现此错误:
W20151027-19:59:16.814(0)? (STDERR)
W20151027-19:59:16.814(0)? (STDERR) /Users/dev/.meteor/packages/meteor-tool/.1.1.10.1xbrzvw++os.osx.x86_64+web.browser+web.cordova/mt- os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151027-19:59:16.815(0)? (STDERR) throw(ex);
W20151027-19:59:16.815(0)? (STDERR) ^
W20151027-19:59:16.942(0)? (STDERR) Error: deny: Value for `update` must be a function
W20151027-19:59:16.942(0)? (STDERR) at packages/mongo/collection.js:755:1
W20151027-19:59:16.942(0)? (STDERR) at Array.forEach (packages/es5-shim/.npm/package/node_modules/es5-shim/es5-shim.js:417:1)
W20151027-19:59:16.942(0)? (STDERR) at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
W20151027-19:59:16.942(0)? (STDERR) at [object Object].addValidator (packages/mongo/collection.js:752:1)
W20151027-19:59:16.943(0)? (STDERR) at [object Object].Mongo.Collection.deny (packages/mongo/collection.js:804:1)
W20151027-19:59:16.943(0)? (STDERR) at Posts.getNotificationProperties.properties.postAuthorName (lib/herald.js:7:21)
W20151027-19:59:16.943(0)? (STDERR) at /Users/dev/Desktop/akhbar/danzo/.meteor/local/build/programs/server/boot.js:249:5
=> Exited with code: 8
谢谢,
【问题讨论】:
-
嘿,你解决了这个问题吗?
-
@Saidh 将 - 行替换为 + Herald.collection.deny({ - update: !Users.can.editById, - remove: !Users.can.editById + update: function(){ return ! Users.can.editById; }, + remove: function(){ return !Users.can.editById; } });
-
是的,我刚刚做到了,并且工作了。谢谢。最初找不到要替换的文件。