在AWS-EC2上部署mup的麻烦

时间:2018-01-30 19:28:12

标签: amazon-web-services meteor npm mup

我正在尝试在Amazon Web Services上部署meteor-react-app。 Mup设置结果,

Started TaskList: Setup Docker
[54.69.xxx.xxx] - Setup Docker
[54.69.xxx.xxx] - Setup Docker: SUCCESS

Started TaskList: Setup Meteor
[54.69.xxx.xxx] - Setup Environment
[54.69.xxx.xxx] - Setup Environment: SUCCESS

Started TaskList: Setup Mongo
[54.69.xxx.xxx] - Setup Environment
[54.69.xxx.xxx] - Setup Environment: SUCCESS
[54.69.xxx.xxx] - Copying mongodb.conf
[54.69.xxx.xxx] - Copying mongodb.conf: SUCCESS

Started TaskList: Start Mongo
[54.69.xxx.xxx] - Start Mongo
[54.69.xxx.xxx] - Start Mongo: SUCCESS

Next, you should run:
mup deploy

但是当我运行mup deploy时,它建议我添加npm包。

Building App Bundle Locally

Unable to resolve some modules:

"babel-runtime/helpers/possibleConstructorReturn" in /home/ubuntu/meteor/ECSystems/imports/adminDashboard/dashboard/components/AdminHeader.jsx(web.browser)
"babel-runtime/helpers/inherits" in /home/ubuntu/meteor/ECSystems/imports/adminDashboard/dashboard/components /AdminHeader.jsx(web.browser)
"babel-runtime/helpers/classCallCheck" in /home/ubuntu/meteor/ECSystems/imports/adminDashboard/dashboard/components/AdminHeader.jsx(web.browser)
"react" in /home/ubuntu/meteor/ECSystems/lib/adminRoutes.js (web.browser)
"react-mounter" in /home/ubuntu/meteor/ECSystems/lib/adminRoutes.js (web.browser)
"react-dom" in /home/ubuntu/meteor/ECSystems/imports/adminDashboard/dashboard/components/AdminHeader.jsx(web.browser)
"prop-types" in /home/ubuntu/meteor/ECSystems/imports/adminDashboard/dashboard/components/DashboardLayout.jsx(web.browser)

If you notice problems related to these missing modules, consider running:

meteor npm install --save babel-runtime react react-mounter react-dom
prop-types

所以,我尝试运行以下命令,

meteor npm install --save babel-runtime react react-mounter react-dom prop-types

结果是

npm ERR! Unexpected token < in JSON at position 49708

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-01-30T19_26_50_381Z-
debug.log

怎么办?没有得到我错的地方。 提前谢谢!

1 个答案:

答案 0 :(得分:2)

转到你的app目录,然后rm package.lock就可以了。之后我安装了所有与react相关的npm软件包,部署成功。 This链接帮助了我。谢谢。

Building App Bundle Locally

Started TaskList: Pushing Meteor App
[54.69.xxx.xxx] - Pushing Meteor App Bundle to the Server
[54.69.xxx.xxx] - Pushing Meteor App Bundle to the Server: SUCCESS
[54.69.xxx.xxx] - Prepare Bundle
[54.69.xxx.xxx] - Prepare Bundle: SUCCESS

Started TaskList: Configuring App
[54.69.xxx.xxx] - Pushing the Startup Script
[54.69.xxx.xxx] - Pushing the Startup Script: SUCCESS
[54.69.xxx.xxx] - Sending Environment Variables
[54.69.xxx.xxx] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[54.69.xxx.xxx] - Start Meteor
[54.69.xxx.xxx] - Start Meteor: SUCCESS
[54.69.xxx.xxx] - Verifying Deployment
[54.69.xxx.xxx] - Verifying Deployment: SUCCESS