阅读背景:

部署的NodeJS站点版本未在AWS上加载

来源:互联网 

I am doing my first deployment on AWS (using Elastic Beanstalk), and I am completely new to this.

我正在AWS上进行我的第一次部署(使用Elastic Beanstalk),我对此完全陌生。

I built a personal website using NodeJS / Express, and on my local machine it loads just fine. Once I was ready to deploy a v1, I created an AWS account and set up a new EBS application environment for Node. I set up the static files to load from /public, set my node version, and set the launch command as node app.js, but those were the only options I changed.

我使用NodeJS / Express构建了一个个人网站,在我的本地机器上它加载得很好。在我准备好部署v1之后,我创建了一个AWS账户并为Node设置了一个新的EBS应用程序环境。我设置要从/ public加载的静态文件,设置我的节点版本,并将启动命令设置为节点app.js,但这些是我更改的唯一选项。

I zipped up my site (using CNTL + Click -> Compress on a selection of all site files) and uploaded that zip, and after some time, it came up all green. Clicking the link to load my site though, I get a half finished version. Looking at my console, I see that I am getting 4 files as 404, and because of that, 4 failures from RequireJS.

我压缩了我的网站(使用CNTL +点击 - >压缩选择所有网站文件)并上传了该zip文件,一段时间后,它全部显示为绿色。点击链接加载我的网站,我得到一个半完成版本。看着我的控制台,我看到我得到4个文件为404,因此,4个来自RequireJS的失败。

These 4 files are backbone views, and are contained in a folder with 4 other JS files that are all loading just fine (I can open them in the chrome dev tools source tab from the deployed version). I am confused how just these 4 files would go missing.

这4个文件是主干视图,并包含在一个文件夹中,其中包含4个其他JS文件,这些文件都可以正常加载(我可以在部署版本的chrome dev工具源选项卡中打开它们)。我很困惑这些4个文件是如何丢失的。

Is there some way to FTP into where ever my files are contained, to confirm the files are in fact not present? And barring that, what steps are available to figure out what is occurring here? Like I said, it looks and loads just fine locally, and I am at a loss as to where to even start debugging something like this. The AWS docs I have read so far only tell me to do exactly what I have been doing.

有没有办法FTP到我的文件包含的地方,以确认文件实际上不存在?除此之外,有哪些步骤可以找出这里发生的事情?就像我说的那样,它在本地看起来和加载都很好,我甚至不知道在哪里开始调试这样的东西。到目前为止我读过的AWS文档只告诉我完全按照自己的方式去做。

Repo for the project is here: https://github.com/RyanMG/trustycode

该项目的回购在这里:https://github.com/RyanMG/trustycode

And the deployment is here: https://trustycode.elasticbeanstalk.com/

部署在这里:https://trustycode.elasticbeanstalk.com/

The files it is having trouble with are under public/javascript/views/ (CodeView, AboutView, PhotoView, DesignView)

它遇到问题的文件在public / javascript / views /下(CodeView,AboutView,PhotoView,DesignView)

Any ideas / advice?

任何想法/建议?

2 个解决方案

#1


1  

Is there some way to FTP into where ever my files are contained, to confirm the files are in fact not present?

有没有办法FTP到我的文件包含的地方,以确认文件实际上不存在?

You can ssh into the EC2 instance of the Elastic Beanstalk app using your pem file. Check files in /var/app/current

您可以使用pem文件ssh到Elastic Beanstalk应用程序的EC2实例。检查/ var / app / current中的文件

#2


0  

I don't have the reputation to comment, but that is one of those common gotchas I found myself switching to OSX from GNU/LINUX at work. OSX is case insensitive; linux world is case sensitive.

我没有评论的声誉,但这是我发现自己在工作时从GNU / LINUX切换到OSX的常见问题之一。 OSX不区分大小写; linux世界区分大小写。


分享到: