简体   繁体   English

“ mup deploy”是否需要在本地运行“ meteor npm install”?

[英]Does `mup deploy`require to run `meteor npm install` before (locally)?

I have an app I like to deploy with meteor-up / mup. 我有一个喜欢通过流星/ Mup部署的应用程序。

In my packages.json I have babel-runtime listed: 在我的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"
  }
}

However, when I do mup setup && mup deploy I get this error: 但是,当我执行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();
   ^

What I don't understand: 我不明白的是:

Do I have to run meteor npm install locally before I do mup setup ? 在进行mup setup之前,是否必须在本地运行meteor npm install

Actually, I would expect that mup does this automatically while building and deploying the app. 实际上,我希望Mup在构建和部署应用程序时自动执行此操作。

I'm glad for any help to understand how this works! 我很高兴能为您提供帮助,帮助您了解其工作原理!

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM