`mup deploy`是否需要在(本地)之前运行`meteor npm install`?

时间:2017-11-05 09:26:21

标签: meteor npm npm-install meteor-up

我有一个应用程序,我喜欢使用meteor-up / mup进行部署。

在我的packages.json中,我列出了babel-runtime:

{
  // .....
  "dependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.2",
    "babel-runtime": "^6.23.0",
    "bcrypt": "^1.0.2"
  },
  "engines": {
    "node": "4.8"
  }
}

然而,当我mup setup && mup deploy时,我收到此错误:

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 meteorInstall.node_modules.meteor.babel-runtime.babel-runtime.js (packages/babel-runtime.js:36:9)
    at fileEvaluate (packages/modules-runtime.js:197:9)
    at require (packages/modules-runtime.js:120:16)
    at packages/babel-runtime.js:138:15
    at packages/babel-runtime.js:149:3
    at /built_app/programs/server/boot.js:303:34
    at Array.forEach (native)
    at Function._.each._.forEach (/built_app/programs/server/node_modules/underscore/underscore.js:79:11)
    at /built_app/programs/server/boot.js:128:5
    at /built_app/programs/server/boot.js:352:5
=> Starting meteor app on port:80
/built_app/programs/server/boot.js:356
}).run();
   ^

我不明白:

meteor npm install之前,我是否必须在本地运行mup setup

实际上,我希望mup在构建和部署应用程序时自动执行此操作。

我很高兴能帮助你了解这是如何运作的!

1 个答案:

答案 0 :(得分:2)

您需要在部署之前运行meteor npm install,因为MeteorUp需要所有npm依赖项才能在您的计算机上构建软件包。