![](/img/trans.png)
[英]Error deploying a node.js app to Elastic Beanstalk on Amazon Linux 2
[英]Elastic Beanstalk with node.js start error
嘗試在彈性beantalk中運行node.js應用程序時出現錯誤。 我按照此處針對快速應用程序的說明進行操作,但是當我檢查node.js日志時,我可以看到節點進程退出並出現權限錯誤。 我不確定在這里做什么?
> express-test@0.0.1-52 start /var/app/current
> src/server.js
sh: src/server.js: Permission denied
npm ERR! express-test@0.0.1-52 start: `src/server.js`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the express-test@0.0.1-52 start script.
npm ERR! This is most likely a problem with the express-test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! src/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls express-test
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.10.35-43.137.amzn1.x86_64
npm ERR! command "/opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v0.10.26-linux-x64/bin/npm" "start"
npm ERR! cwd /var/app/current
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/app/current/npm-debug.log
npm ERR! not ok code 0
您在scripts
部分的package.json
文件中有什么?
我猜想您忘記了將該命令的開頭部分,而是嘗試執行server.js,這是一個js文件,無法執行。
相反,請嘗試:
"scripts": {
"start": "node server.js"
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.