我有一个我喜欢用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();
^
我不明白的是:
在执行mup setup
之前,我是否必须在本地运行meteor npm install
?
实际上,我希望mup在构建和部署应用程序时自动执行此操作。
我很高兴有任何帮助来了解它是如何工作的!
您需要
在部署之前运行meteor npm install
,因为 MeteorUp 需要所有 npm 依赖项才能在您的计算机上构建捆绑包。