1

我正在尝试在 Amazon Web Services 上部署流星反应应用程序。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

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

4

1 回答 1

2

转到您的应用程序目录,然后 rm package.lock 成功了。之后我安装了所有与 react 相关的 npm 包,部署成功。 这个链接帮助了我。谢谢你。

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
于 2018-01-30T19:46:59.943 回答