【问题标题】:Errors after Meteor upgradeMeteor 升级后的错误
【发布时间】:2017-06-02 06:26:18
【问题描述】:

我刚刚执行了meteor update,它把我带到了 v1.5。我收到很多TypeError: module.exportDefault is not a function 错误。 目前它在 at meteorInstall.node_modules.meteor.react-meteor-data.ReactMeteorData.jsx (packages/react-meteor-data/ReactMeteorData.jsx:1:8) 但它发生在几个包上。我认为这与动态导入有关,但我无法深入了解。 拔掉我的头发。

【问题讨论】:

  • 你能尝试只更新 ecmascript 包吗? meteor update ecmascript。也许你有同样的issue

标签: meteor


【解决方案1】:

Meteor 由版本配置文件引导,以跟踪应用程序的所有包依赖项。当升级到更高版本的 Meteor 时,比如 1.4 版升级到 1.5 版,我总是对我的包的所有依赖项进行版本重新定义。这样可以避免这样的问题(TypeError: module.exportDefault is not a function)。我建议你也这样做。

$ cd /your-project-folder
$ meteor reset
$ rm .meteor/versions
$ rm -rf node_modules
$ meteor update --all-packages
$ meteor npm install
$ meteor [--settings settings.json]

享受吧!

【讨论】:

    【解决方案2】:

    我遇到了类似的问题,因为安装了 modules@0.10.0-pre.1。 尝试将模块包的版本设置为0.9.1。

    1) 安装meteor add modules@0.9.1
    2) 删除versions 文件或将模块版本设置为0.9.1。

    【讨论】:

      【解决方案3】:

      这最终变得一团糟。不得不回滚并再次前进。到这个时候,已经更新了几个依赖项。道德,始终保持备份井然有序。

      我确实注意到动态导入可能在安装过​​程中出现故障,并注意到缺少版本号。另外,我删除了一些旧的 blaze 东西并刷新了 npm 包。我不完全确定最终是什么解决了它。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多