用node.js和express向后进行openshift崩溃循环



所以我一直在尝试使用openShift创建一个用于动态网页的服务器,因此我创建了一个裸机node.js/express模板,只是用于连接到index.html(到测试代码(,但是当我尝试运行代码时,OpenShift将进入崩溃回路。

注意:我是Node.js和后端开发的新手

openshift错误日志:

Environment: 
    DEV_MODE=false
    NODE_ENV=production
    DEBUG_PORT=5858
Launching via npm...
npm info it worked if it ends with ok
npm info using npm@3.10.9
npm info using node@v6.11.3
npm ERR! Linux 3.10.0-693.15.2.el7.x86_64
npm ERR! argv "/opt/rh/rh-nodejs6/root/usr/bin/node" "/opt/rh/rh-nodejs6/root/usr/bin/npm" "run" "-d" "start"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.9
npm ERR! path /opt/app-root/src/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/opt/app-root/src/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR! Please include the following file with any support request:
npm ERR!     /opt/app-root/src/npm-debug.log

github仓库:https://github.com/trueambition001/trueambition001.github.io

预先感谢。

node.js s2i构建器要求 package.json和应用程序代码位于repo的根目录中,您将其放在子目录中。因此,代码的结构与所需的结构不符。

有关node.js的S2i构建器的一些详细信息,请参见:

  • https://github.com/sclorg/s2i-nodejs-container/tree/master/8

最新更新