Node.js OpenShift repo//package.json错误
我无法将提交推送到openshift服务器。我有一个错误:Node.js OpenShift repo//package.json错误,node.js,openshift,Node.js,Openshift,我无法将提交推送到openshift服务器。我有一个错误: remote: [eval]:1 remote: var p = require('/var/lib/openshift/578a15de2d527132bd00009e/app-root/runtime/repo//package.json'); console.log(p.scripts.start); remote:
remote: [eval]:1
remote: var p = require('/var/lib/openshift/578a15de2d527132bd00009e/app-root/runtime/repo//package.json'); console.log(p.scripts.start);
remote: ^
remote:
remote: TypeError: Cannot read property 'start' of undefined
remote: at [eval]:1:122
remote: at ContextifyScript.Script.runInThisContext (vm.js:25:33)
remote: at Object.exports.runInThisContext (vm.js:77:17)
remote: at Object.<anonymous> ([eval]-wrapper:6:22)
remote: at Module._compile (module.js:541:32)
remote: at bootstrap_node.js:315:29
remote: at _combinedTickCallback (internal/process/next_tick.js:67:7)
remote: at process._tickCallback (internal/process/next_tick.js:98:9)
remote: CLIENT_MESSAGE: Stopping Node.js application...
Connection to ______.rhcloud.com closed by remote host.
fatal: The remote end hung up unexpectedly
remote:[eval]:1
remote:var p=require('/var/lib/openshift/578a15de2d527132bd00009e/app root/runtime/repo//package.json');console.log(p.scripts.start);
远程:^
远程:
远程:TypeError:无法读取未定义的属性“start”
远程:在[评估]:1:122
远程:位于ContextifyScript.Script.runInThisContext(vm.js:25:33)
远程:在Object.exports.runInThisContext(vm.js:77:17)
远程:在对象上。([eval]-包装:6:22)
远程:在模块上编译(Module.js:541:32)
远程:在引导节点上。js:315:29
远程:at_combinedTickCallback(内部/进程/下一步_tick.js:67:7)
远程:在进程中。_tick回调(internal/process/next_tick.js:98:9)
远程:客户端消息:正在停止Node.js应用程序。。。
远程主机已关闭到__________;.rhcloud.com的连接。
致命:远程端意外挂起
如何解决这个问题。有什么建议吗。同样的问题,你找到解决方法了吗?是的,我找到了。通过还原start.js文件,问题得以解决。不要删除该文件,openshift server使用该文件启动workers。我的解决方法不同,我希望使用正确的端口,我使用的是在我的pc上工作的端口,而不是配置的服务器端口(start.js不需要)。我将启动脚本设置为简单的
“scripts”:{“start”:“node app.js”}
同样的问题,你找到解决方法了吗?是的,我找到了。通过还原start.js文件,问题得以解决。不要删除该文件,openshift server使用该文件启动workers。我的解决方法不同,我希望使用正确的端口,我使用的是在我的pc上工作的端口,而不是配置的服务器端口(start.js不需要)。我将启动脚本设置为简单的“scripts”:{“start”:“node app.js”}