我有一个本地工作的节点项目,但是在Openshift上我无法运行它。
我发现当我通过SSH连接到我的应用程序并运行npm install
时,这些是我得到的错误:
npm WARN package.json video-looper@0.0.1 No README data
npm WARN prefer global dev@0.1.3 should be installed with -g
npm WARN unmet dependency /var/lib/openshift/538c552fe0b8cdca350001c0/app-root/runtime/repo/node_modules/express/node_modules/connect requires depd@'0.3.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /var/lib/openshift/538c552fe0b8cdca350001c0/app-root/runtime/repo/node_modules/express/node_modules/connect requires media-typer@'0.2.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /var/lib/openshift/538c552fe0b8cdca350001c0/app-root/runtime/repo/node_modules/express/node_modules/connect requires parseurl@'1.0.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /var/lib/openshift/538c552fe0b8cdca350001c0/app-root/runtime/repo/node_modules/express/node_modules/send requires escape-html@'1.0.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /var/lib/openshift/538c552fe0b8cdca350001c0/app-root/runtime/repo/node_modules/express/node_modules/connect/node_modules/compression requires on-headers@'0.0.0' but will load
npm WARN unmet dependency undefined,
并且列表继续......它们似乎是我的依赖项的依赖项,而不是安装。
我无法解决为什么他们在没有问题的情况下在本地安装但在Openshift上没有安装。有没有人遇到过这个?
这是我的package.json文件:
{
"version": "0.0.1",
"main": "index.js",
"engines": {
"node": ">= 0.10.0"
},
"scripts": {
"start": "node index.js"
},
"dependencies": {
"express": "3.x",
"mongojs" : "0.13.x",
"hashids" : "0.3.3"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-contrib-watch": "0.6.1",
"grunt-contrib-compass": "0.7.2",
"grunt-contrib-uglify": "0.4.0",
"load-grunt-tasks": "0.4.0"
},
"repository": {
"type": "git",
"url": "git@bitbucket.org:pshelley/video-looper.git"
},
"keywords": [
"Video",
"looper"
],
"author": "Patrick Shelley",
"license": "ISC"
}
答案 0 :(得分:0)
我讨厌同样的问题,我用这个
修复了它打开终端并运行以下命令:
rhc ssh -a YOURAPPNAME
cd app-root/repo/
rm -rf node_modules/
npm i