【问题标题】:Meteor Package.describe() method doesn't exist after 0.9 upgradeMeteor Package.describe() 方法在 0.9 升级后不存在
【发布时间】:2014-10-28 12:52:16
【问题描述】:

在新升级到 Meteor 0.9.0.1 并更新我的 package.js 文件以匹配 documentation on packages 后,我收到以下错误

W20140903-17:30:20.305(-4)? (STDERR) /Users/admin/.meteor/packages/meteor-tool/.1.0.26.p03e91++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
W20140903-17:30:20.305(-4)? (STDERR)                        throw(ex);
W20140903-17:30:20.306(-4)? (STDERR)                              ^
W20140903-17:30:20.308(-4)? (STDERR) TypeError: Object #<Object> has no method 'describe'
W20140903-17:30:20.308(-4)? (STDERR)     at app/zeroasterisk:throttle/package.js:1:44
W20140903-17:30:20.308(-4)? (STDERR)     at app/zeroasterisk:throttle/package.js:22:3
W20140903-17:30:20.309(-4)? (STDERR)     at /Development/Meteor/Meteor-Throttle-Example/.meteor/local/build/programs/server/boot.js:161:10
W20140903-17:30:20.309(-4)? (STDERR)     at Array.forEach (native)
W20140903-17:30:20.309(-4)? (STDERR)     at Function._.each._.forEach (/Users/admin/.meteor/packages/meteor-tool/.1.0.26.p03e91++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20140903-17:30:20.309(-4)? (STDERR)     at /Development/Meteor/Meteor-Throttle-Example/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8

$ meteor --version
Meteor 0.9.0.1

$ meteor list
standard-app-packages   1.0.0  Include a standard set of Meteor packages in y...
autopublish             1.0.0  Publish the entire database to all clients
insecure                1.0.0  Allow all database writes by default
bootstrap-3             0.0.0  Provides bootstrap 3.
showdown                1.0.0  Markdown-to-HTML processor
underscore              1.0.0  Collection of small helpers: _.map, _.each, ...
package-version-parser  1.0.6  Parses Meteor Smart Package version string
zeroasterisk:throttle   0.2.1  A secure means of limiting interactions (email...

我不知道我做错了什么......你能吗?

【问题讨论】:

  • 嗯...package.js 看起来不错。也许尝试重新安装流星mv ~/.meteor ~/.meteor.bak &amp;&amp; curl https://install.meteor.com | sh,然后如果没有骰子,请在https://github.com/meteor/meteor/issues提出错误

标签: meteor package upgrade meteorite


【解决方案1】:

我遇到了阻止我部署应用程序的问题。原因是我在客户端文件夹(app/client/packages)中定义了一个包目录。然而,这应该在项目的主目录(app/packages)中。在我删除客户端文件夹中的包文件夹后,应用程序能够毫无问题地部署。

我有一个 Package.describe() 方法调用引发了一个错误,这帮助我找到了这个问题。

【讨论】:

    【解决方案2】:

    我也遇到了同样的问题。这里的问题是你在根应用程序文件夹app/zeroasterisk:throttle 中有包,而它应该是app/packages/zeroasterisk:throttle。把你的包放到packages文件夹里面就可以解决了。

    【讨论】:

      【解决方案3】:

      感谢您的建议 - 事实证明,它一定是其他包。我创建了一个新的 Meteor 应用程序并添加了我的包,它运行良好:/

      所以我不知道确切的原因,也许是某些东西覆盖了 Package 对象,但无论如何解决它很容易。

      【讨论】:

        【解决方案4】:

        您可以尝试阅读软件包迁移的官方指南。在本指南中解释了如何修复损坏的包。网址是

        https://hackpad.com/Migrating-Packages-zN0we9sIjkH

        【讨论】:

          猜你喜欢
          • 2023-03-18
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2018-04-11
          • 1970-01-01
          • 2018-04-21
          • 1970-01-01
          • 2014-10-30
          相关资源
          最近更新 更多