openshift与socket.io,npm安装无法读取依赖关系

在试图在openshift上使用socket.io构buildnode.js服务器时,会发生以下错误。

npm ERR! install Couldn't read dependencies npm ERR! install Couldn't read dependencies npm ERR! Linux 3.10.0-753.el7xtsync.x86_64 npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4 /root/usr/bin/npm" "install" npm ERR! node v4.6.2 npm ERR! npm v2.15.1 npm ERR! file /opt/app-root/src/package.json npm ERR! code EJSONPARSE npm ERR! Failed to parse json npm ERR! Cannot find module './lib/parse' npm ERR! File: /opt/app-root/src/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse npm ERR! Please include the following file with any support request: npm ERR! /opt/app-root/src/npm-debug.log 

但是,代码在我的本地机器上运行良好,没有任何错误

我使用下面的package.json

 { "name": "socket_thing", "version": "0.0.1", "description": "To make a server plugin for superpowers", "scripts": { "start": "node server.js" }, "main": "server.js", "dependencies": { "express": "^4.15.2", "socket.io": "^2.0.4" } } 

有什么理由为什么在openshift上处理依赖关系的方式不同,因为这似乎是问题所在?

所以看来,使用最新版本的快递

 "express": "^4.16.2" 

在package.json中解决了这个问题。