【问题标题】:Cannot find module '@babel/runtime/helpers/builtin/objectSpread' after update meteor to 1.6.1.1将流星更新到 1.6.1.1 后找不到模块“@babel/runtime/helpers/builtin/objectSpread”
【发布时间】:2018-09-12 22:53:25
【问题描述】:

我将我的流星项目更新为 Meteor 1.6.1.1。我收到了这个错误信息

  => Exited with code: 1
W20180403-15:33:17.531(2)? (STDERR) E:\Personnal folders\quicktext5\.meteor\local\build\programs\server\boot.js:475
W20180403-15:33:17.534(2)? (STDERR) }).run();
W20180403-15:33:17.535(2)? (STDERR)    ^
W20180403-15:33:17.539(2)? (STDERR)
W20180403-15:33:17.540(2)? (STDERR) Error: Cannot find module '@babel/runtime/helpers/builtin/objectSpread'
W20180403-15:33:17.541(2)? (STDERR)     at Function.Module._resolveFilename (module.js:547:15)
W20180403-15:33:17.543(2)? (STDERR)     at Function.resolve (internal/module.js:18:19)
W20180403-15:33:17.547(2)? (STDERR)     at Object.require (E:\Personnal folders\quicktext5\.meteor\local\build\programs\server\boot.js:288:32)
W20180403-15:33:17.548(2)? (STDERR)     at makeInstallerOptions.fallback (packages\modules-runtime.js:651:18)
W20180403-15:33:17.548(2)? (STDERR)     at require (packages\modules-runtime.js:244:16)
W20180403-15:33:17.549(2)? (STDERR)     at livedata_connection.js (E:\Personnal folders\quicktext5\.meteor\local\build\programs\server\packages\ddp-client.js:149:45)
W20180403-15:33:17.550(2)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20180403-15:33:17.550(2)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20180403-15:33:17.551(2)? (STDERR)     at namespace.js (packages/ddp-client/common/namespace.js:1:300)
W20180403-15:33:17.556(2)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)

我试图删除 node_modules 文件夹并运行npm install
我也尝试安装meteor npm install --save babel-runtime 但仍然有同样的错误
有什么建议吗?

【问题讨论】:

    标签: meteor npm babeljs


    【解决方案1】:

    因为meteor-babel npm 包已经更新到版本7.0.0-beta.44,这可能需要更新我在.babelrc 文件中启用的任何自定义Babel 插件,我尝试运行以下命令来更新@babel/运行时:

    meteor npm install @babel/runtime@latest
    

    感谢 @robfallowsMeteor 论坛 中回答了我的问题 https://forums.meteor.com/t/cannot-find-module-babel-runtime-helpers-builtin-objectspread-after-update-meteor-to-1-6-1-1/43034

    【讨论】:

      【解决方案2】:

      如果有人仍然遇到同样的问题,如果您没有使用meteor1.7.x,那么最新版本的 babel/runtime 可能无法为您修复错误,因为它没有为我修复,但是什么有效是要使用的。

      meteor npm install babel/runtime@7.0.0-beta.55

      不过,最好的选择是更新到最新版本的 Meteor,但如果您还没有准备好使用上面的 beta 版本,它将修复错误。

      【讨论】:

        【解决方案3】:

        更新到识别错误的 Meteor 1.7,据说这样做:

        meteor npm install --save-exact @babel/runtime@7.0.0-beta.55
        

        重新上线!

        【讨论】:

          猜你喜欢
          • 2019-01-14
          • 2016-03-23
          • 2016-07-14
          • 2019-06-21
          • 2022-06-10
          • 2019-01-12
          • 2019-01-13
          • 2020-10-09
          相关资源
          最近更新 更多