流星问题类型错误:无法调用未定义的方法'remove'



我的流星项目有问题。我已经有一段时间没有工作了,在更新和运行后,我得到了。

    => 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

我也在使用陨石来运行此项目。

如果您一段时间没有进行过一些更新,则需要执行一些更新:

  • 文件现在已可变范围,因此,如果您定义了一个集合,例如一个文件中的var Mycollection,则该文件将无法由另一个文件访问,因此为什么您可能会收到很多undefined错误。

如果对您有所帮助,则您还有更长的更新列表:

  • 软件包也已被命名,因此,除了可变范围外,文件还名为。(请注意,这也可能导致您的问题)。您需要在包装中使用api.export导出变量。

这些是可能给您造成问题的更新,您没有提供足够的详细信息来查看哪一个,但是您可以看到更新或更新时的注释中发生了什么变化https://github.com/meteor/meteor/blob/devel/history.md

最新更新