【问题标题】:Meteor 1.4.2.3 - babel-runtime npm package could not be found in your node_modulesMeteor 1.4.2.3 - 在你的 node_modules 中找不到 babel-runtime npm 包
【发布时间】:2017-05-20 18:24:17
【问题描述】:

我刚刚在 Ubuntu 服务器上部署了一个 Meteor 应用程序,安装了所有软件包,但是当我尝试访问该页面时,浏览器控制台一直显示这个

Uncaught Error: The babel-runtime npm package could not be found in your node_modules 
directory. Please run the following command to install it:

  meteor npm install --save babel-runtime


    at t.node_modules.meteor.babel-runtime.babel-runtime.js (a72cdf7….js?meteor_js_resource=true:34)
    at a (a72cdf7….js?meteor_js_resource=true:9)
    at r (a72cdf7….js?meteor_js_resource=true:9)
    at a72cdf7….js?meteor_js_resource=true:34
    at a72cdf7….js?meteor_js_resource=true:34
t.node_modules.meteor.babel-runtime.babel-runtime.js @ a72cdf7….js?meteor_js_resource=true:34
a @ a72cdf7….js?meteor_js_resource=true:9
r @ a72cdf7….js?meteor_js_resource=true:9
(anonymous) @ a72cdf7….js?meteor_js_resource=true:34
(anonymous) @ a72cdf7….js?meteor_js_resource=true:34

我按要求执行了流星 npm install --save babel-runtime,但似乎没有效果。

有人遇到同样的错误吗?

提前致谢

【问题讨论】:

  • 如果你在你的服务器上运行 Meteor 命令你做错了。您应该构建一个包,部署包,执行 npm 安装并准备好使用
  • 嗯,这就是我正在做的,但仍然在客户端收到此错误。
  • 嗨,是的,我也遇到了这个问题......你能解决这个问题吗?怎么样?

标签: meteor babeljs


【解决方案1】:

请注意,此错误来自 2017 年。当时有几个人得到了 this GitHub comment 的帮助:

确保在构建生产包之前 npm install。

$ git clone repo
$ cd repo
$ npm install # IMPORTANT!
$ meteor build --directory ../build

现在在 Meteor 1.8.1 上,我遇到了同样的错误,除了 @babel/runtime 而不是 babel-runtime。同样的解决方案仍然有效:在您的源目录中运行npm install之前运行meteor build

【讨论】:

    猜你喜欢
    • 2022-10-17
    • 1970-01-01
    • 2022-06-10
    • 1970-01-01
    • 2022-09-28
    • 2020-10-09
    • 2018-05-26
    • 2016-03-23
    • 1970-01-01
    相关资源
    最近更新 更多