【发布时间】:2015-11-28 11:49:36
【问题描述】:
我是流星新手,过去几天一直在玩 Telescope。昨天,我更新了包。从那时起,我无法在我的 Mac 上运行 Telescope 应用程序。
=> Started proxy.
=> Started MongoDB.
I20151128-19:27:24.429(8)? Kadira: completed instrumenting the app
W20151128-19:27:24.432(8)? (STDERR)
W20151128-19:27:24.432(8)? (STDERR) /Users/bala/.meteor/packages/meteor-tool/.1.1.10.jru118++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151128-19:27:24.432(8)? (STDERR) throw(ex);
W20151128-19:27:24.433(8)? (STDERR) ^
W20151128-19:27:24.433(8)? (STDERR) Error: deny: Value for `update` must be a function
W20151128-19:27:24.433(8)? (STDERR) at packages/mongo/collection.js:755:1
W20151128-19:27:24.433(8)? (STDERR) at Array.forEach (packages/es5-shim/.npm/package/node_modules/es5-shim/es5-shim.js:417:1)
W20151128-19:27:24.433(8)? (STDERR) at Function._.each._.forEach (packages/underscore/underscore.js:105:1)
W20151128-19:27:24.433(8)? (STDERR) at [object Object].addValidator (packages/mongo/collection.js:752:1)
W20151128-19:27:24.433(8)? (STDERR) at [object Object].Mongo.Collection.deny (packages/mongo/collection.js:804:1)
W20151128-19:27:24.433(8)? (STDERR) at Posts.getNotificationProperties.properties.postAuthorName (lib/herald.js:7:21)
W20151128-19:27:24.433(8)? (STDERR) at /Users/bala/meteor/Telescope/.meteor/local/build/programs/server/boot.js:249:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
谁能帮我解决这个问题。
*Herald.js 文件在下面
if (Meteor.absoluteUrl().indexOf('localhost') !== -1)
Herald.settings.queueTimer = 1000;
Meteor.startup(function () {
Herald.collection.deny({ update: !Users.can.editById, remove: !Users.can.editById });
// disable all email notifications when "emailNotifications" is set to false
Herald.settings.overrides.email = !Settings.get('emailNotifications', true); });
【问题讨论】:
-
尝试更新流星?可能是一些兼容性问题。
-
是的,我也尝试过更新 Meteor。还是一样的问题
-
你能在这里粘贴 lib/herald.js 文件吗?请用代码更新问题。
-
if (Meteor.absoluteUrl().indexOf('localhost') !== -1) Herald.settings.queueTimer = 1000; Meteor.startup(function () { Herald.collection.deny({ update: !Users.can.editById, remove: !Users.can.editById }); // 当“emailNotifications”设置为 false 时禁用所有电子邮件通知 Herald .settings.overrides.email = !Settings.get('emailNotifications', true); });
-
cmets 中的代码不可读。如果您真的希望有人检查它,请更新问题。