2014-09-02 44 views
1

我有一個本地工作的節點項目,但在Openshift上無法運行。節點相關性不會在Openshift上安裝

我發現,當我SSH到我的應用程序和運行npm install這些都是我得到的錯誤:

npm WARN package.json [email protected] No README data 
npm WARN prefer global [email protected] should be installed with -g 
npm WARN unmet dependency /var/lib/openshift/538c552fe0b8cdca350001c0/app-root/runtime/repo/node_modules/express/node_modules/connect requires [email protected]'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 [email protected]'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 [email protected]'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 [email protected]'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 [email protected]'0.0.0' but will load 
npm WARN unmet dependency undefined, 

和這樣的例子不勝枚舉......他們似乎是我的依賴關係的依賴關係AREN」安裝。

我不知道爲什麼他們在沒有問題的地方安裝,但沒有在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": "[email protected]:pshelley/video-looper.git" 
    }, 
    "keywords": [ 
    "Video", 
    "looper" 
    ], 
    "author": "Patrick Shelley", 
    "license": "ISC" 
} 
+0

您可以發佈你的package.json文件?在你的node_modules目錄中檢查也是值得的。我們通過ghost博客快速入門來做到這一點,以便快速部署。 – 2014-09-02 16:20:56

+0

我會檢查以確保您的package.json文件格式正確。另外,您可能需要檢查您的node_modules文件夾 - futurealoof.com/posts/nodemodules-in-git.html – 2014-09-02 16:22:36

+0

我已將我的package.json文件添加到該文章。 – Pat 2014-09-03 17:49:09

回答

0

我哈得同樣的問題,我和這個

開放的終端固定並運行以下命令:

rhc ssh -a YOURAPPNAME 
cd app-root/repo/ 
rm -rf node_modules/ 
npm i