【问题标题】:Error while launching meteor after upgraded to the last version 1.2.1升级到最新版本 1.2.1 后启动流星时出错
【发布时间】: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; } });
  • 是的,我刚刚做到了,并且工作了。谢谢。最初找不到要替换的文件。

标签: node.js mongodb meteor


【解决方案1】:

查看release notes

Collection#allow/deny 现在在传递虚假值时会抛出错误。 #5442

【讨论】:

    猜你喜欢
    • 2017-06-21
    • 1970-01-01
    • 2021-11-26
    • 1970-01-01
    • 2019-02-06
    • 1970-01-01
    • 2016-01-15
    • 1970-01-01
    • 2021-06-18
    相关资源
    最近更新 更多