【发布时间】:2018-06-18 21:18:59
【问题描述】:
我刚刚将我的第一个 Web 应用程序部署到 Elastic Beanstalk,但是当我尝试访问它时,我收到“502 Bad Gateway”错误。在日志中,我看到了这个错误。
npm ERR! Please include the following file with any support request:
npm ERR! /var/app/current/npm-debug.log
npm ERR! Linux 4.14.33-51.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.13.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.13.1-linux-x64/bin/npm" "start"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! path /var/app/current/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/var/app/current/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/var/app/current/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
我做了一些谷歌搜索,似乎这个问题发生在用户不仅压缩文件夹的内容,而且压缩顶级文件夹本身时。但是,这不是我的情况 - 我的 .zip 文件的根目录中有 package.json 文件,但系统仍然找不到它。有谁知道问题出在哪里或如何找到根本原因?
谢谢
【问题讨论】:
标签: node.js amazon-web-services amazon-elastic-beanstalk