【问题标题】:Elastic Beanstalk with node.js start error带有 node.js 的 Elastic Beanstalk 启动错误
【发布时间】:2014-11-22 03:28:56
【问题描述】:

尝试在弹性 beanstalk 中运行 node.js 应用程序时出现错误。我按照说明 here 进行了快速应用程序,但是当我检查 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

【问题讨论】:

    标签: node.js amazon-web-services amazon-elastic-beanstalk


    【解决方案1】:

    scripts 部分的package.json 文件中有什么内容?

    我猜你忘了输入命令的开头部分,而是尝试执行 server.js,这是一个 js 文件,不可执行。

    请尝试:

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

    【讨论】:

    • 向您致敬,先生。节省了我数小时的调试时间。
    • 没问题。很高兴我能帮上忙 =]
    猜你喜欢
    • 2018-03-09
    • 2016-03-11
    • 2015-07-21
    • 2019-07-07
    • 2014-07-18
    • 2014-08-07
    • 2013-08-01
    • 2018-07-02
    • 2017-02-05
    相关资源
    最近更新 更多