【发布时间】:2018-05-09 09:56:52
【问题描述】:
我正在尝试将 Node.js 应用程序部署到弹性 beanstalk。问题是,它每次都在启动脚本中失败。我已将 ec2 配置为使用启动脚本 npm start,它执行 node app.js(在 package.json 中定义)。但是,此启动脚本在 ec2 中失败。我收到记录的错误,
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myProject start script 'node app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Portfolio package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs myProject
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls myProject
npm ERR! There is likely additional logging output above.
这是什么意思?在我的命令行上运行 npm start 在压缩到 AWS 的同一应用程序的根目录中运行良好,在 localhost 上运行。我还更新了 npm 和 node.js
这是压缩后部署的文件结构:
.zip
- node_modules/
- 公开/
- app.js
- package.json
- package-lock.json
【问题讨论】:
标签: json node.js amazon-web-services amazon-ec2 amazon-elastic-beanstalk