【发布时间】:2014-03-07 15:31:14
【问题描述】:
我的流星项目有问题。我有一段时间没有工作了,在更新和运行之后我得到了这个。
=> Exited with code: 8
W20140306-15:04:49.602(-8)? (STDERR)
W20140306-15:04:49.603(-8)? (STDERR) /Users/goddard/.meteor/tools/f3947a4651/lib/node_modules/fibers/future.js:173
W20140306-15:04:49.604(-8)? (STDERR) throw(ex);
W20140306-15:04:49.604(-8)? (STDERR) ^
W20140306-15:04:49.607(-8)? (STDERR) TypeError: Cannot call method 'remove' of undefined
W20140306-15:04:49.608(-8)? (STDERR) at app/server/collections/settings.js:3:36
W20140306-15:04:49.608(-8)? (STDERR) at app/server/collections/settings.js:26:3
W20140306-15:04:49.608(-8)? (STDERR) at /Users/goddard/Projects/meteortest/.meteor/local/build/programs/server/boot.js:155:10
W20140306-15:04:49.608(-8)? (STDERR) at Array.forEach (native)
W20140306-15:04:49.609(-8)? (STDERR) at Function._.each._.forEach (/Users/goddard/.meteor/tools/f3947a4651/lib/node_modules/underscore/underscore.js:79:11)
W20140306-15:04:49.609(-8)? (STDERR) at /Users/goddard/Projects/meteortest/.meteor/local/build/programs/server/boot.js:82:5
我也在使用陨石来运行这个项目。
【问题讨论】:
-
在我看来,您的代码有问题。
-
如果没有看到
settings.js的内容,很难说,但我猜一下:您正在调用remove的集合,该集合目前尚未定义remove叫做。选项包括:将您的集合定义移动到/lib下或在 startup 函数中调用remove。 -
您是否检查了与您在 package.json 中指定依赖项的方式的连接?可能是您依赖的模块在最近的版本中发生了重大的接口更改。如果您的 package.json 模块的版本规范允许更新到这个(假设的)更新版本,但您的代码(或您依赖的另一个模块的代码)假设在旧接口上,您可以轻松运行进入这个场景。我时常看到这个。
-
要提供完整的答案,我们确实需要在您的代码中看到这一行:
app/server/collections/settings.js:3