Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
node.js在部署到elastic beanstalk后找不到app.js_Node.js_Amazon Web Services_Amazon Elastic Beanstalk - Fatal编程技术网

node.js在部署到elastic beanstalk后找不到app.js

node.js在部署到elastic beanstalk后找不到app.js,node.js,amazon-web-services,amazon-elastic-beanstalk,Node.js,Amazon Web Services,Amazon Elastic Beanstalk,我刚刚通过执行ebpush将我的应用程序部署到elastic beanstalk 我的应用程序未启动,node.js日志显示以下内容: Error: Cannot find module '/var/app/current/dist/app.js' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Function.Module.runMain

我刚刚通过执行
ebpush
将我的应用程序部署到elastic beanstalk

我的应用程序未启动,node.js日志显示以下内容:

Error: Cannot find module '/var/app/current/dist/app.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
在我的putty课程中,肯定有一个app.js

[ec2-user@ip-172-31-12-80 dist]$ pwd
/var/app/current/dist
[ec2-user@ip-172-31-12-80 dist]$ ls -l
total 20
-rw-r--r--  1 nodejs nodejs 3298 Apr 14 11:43 app.js
drwxr-xr-x 27 nodejs nodejs 4096 Apr 14 11:43 node_modules
-rw-r--r--  1 nodejs nodejs  858 Apr 14 11:43 package.json
drwxr-xr-x  3 nodejs nodejs 4096 Apr 14 11:43 public
drwxr-xr-x  2 nodejs nodejs 4096 Apr 14 11:43 routes
有人知道会出什么问题吗

提前感谢,,
Chris

你能给我们看看你的package.json的内容吗?你的package.json是否有
的“脚本”:{“开始”:“node app.js”}
条目?你是如何找到解决方案的?