2014-09-27 87 views
1

嘗試在彈性beanstalk中運行node.js應用程序時出現錯誤。我按照指示here爲快速應用程序,但是當我檢查node.js日誌時,我可以看到節點進程退出時出現權限錯誤。我不確定這裏要做什麼?帶有node.js的Elastic Beanstalk啓動錯誤

> [email protected] start /var/app/current 
> src/server.js 

sh: src/server.js: Permission denied 

npm ERR! [email protected] start: `src/server.js` 
npm ERR! Exit status 126 
npm ERR! 
npm ERR! Failed at the [email protected] 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 

回答

2

你在你的package.json文件中scripts部分有哪些?

我猜你忘了把命令的開始部分,而是試圖執行server.js,這是一個js文件,是不可執行的。

相反,嘗試:

"scripts": { 
    "start": "node server.js" 
    }, 
+0

榮譽給你,先生。爲我節省了數小時的調試時間。 – worker1138 2014-09-27 05:25:56

+1

沒問題。很高興我能幫忙=] – 2014-09-27 06:05:05