pra*_*sun 7 node.js openshift bower
我无法在Openshift上安装bower.我一直在犯错误
remote: npm ERR! Error: ENOENT, lstat '/var/lib/openshift/537xxxxcd/app-root/runtime/repo/node_modules/bower/node_modules/mout/array/intersection.js'[K
remote: npm ERR! If you need help, you may report this log at:[K
remote: npm ERR! <http://github.com/isaacs/npm/issues>[K
remote: npm ERR! or email it to:[K
remote: npm ERR! <npm-@googlegroups.com>[K
Run Code Online (Sandbox Code Playgroud)
您可以看到完整的部署日志https://s3.amazonaws.com/archive.travis-ci.org/jobs/26291843/log.txt [来自travis here].
我尝试了几种方法:1)有和没有.bowerrc文件
情况1
{
"directory": "~/app-root/runtime/repo/public/libs"
"storage": {
"cache": "~/app-root/runtime/repo/node_modules/bower/cache",
"completion": "~/app-root/runtime/repo/node_modules/bower/completion",
"git": "~/app-root/runtime/repo/node_modules/bower/git_template"
},
"interactive": "false",
"tmp":"~/app-root/runtime/repo/node_modules/bower/tmp",
"cwd":"~/app-root/runtime/repo"
}
Run Code Online (Sandbox Code Playgroud)
案例:2
{
"directory": "public libs"
}
Run Code Online (Sandbox Code Playgroud)
尝试运行以下命令[在$ HOME/app-root/runtime/repo]并尝试通过SSH shell运行npm install bower
npm cache clear
npm cache clean
Run Code Online (Sandbox Code Playgroud)
解决这个问题的任何帮助都会很棒.
如果你想查看我的回购,你可以在这里找到它:https: //github.com/prasunsultania/demoblog
ana*_*ico 16
以下是我使用bowernode.js盒式磁带在OpenShift上的使用方法:
先决条件:
bower install从repo的根目录完成工作.必要的步骤:
.openshift/action_hooks/deploychmod +x .openshift/action_hooks/deploy让它可执行文件之前,可以添加和提交到您的回购#!/usr/bin/env bash
HOME=$HOME/app-root/runtime
cd ~/repo
npm install bower
./node_modules/.bin/bower install
Run Code Online (Sandbox Code Playgroud)
这表明以下方法:
"bower": "latest"于package.json为postinstall添加脚本:
"scripts": {
...
"postinstall": "HOME=$OPENSHIFT_REPO_DIR bower install || bower install"
},
Run Code Online (Sandbox Code Playgroud)| 归档时间: |
|
| 查看次数: |
2972 次 |
| 最近记录: |