无法在Openshift上安装凉亭 [英] Unable to install bower on Openshift

查看:84
本文介绍了无法在Openshift上安装凉亭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Openshift上安装Bower.我不断收到类似的错误

I am unable to install bower on Openshift. I keep on getting errors like

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

您可以看到完整的部署日志 https://s3.amazonaws.com/archive.travis-ci.org/jobs/26291843/log.txt [从travis这里].

You can see full deployment logs https://s3.amazonaws.com/archive.travis-ci.org/jobs/26291843/log.txt [From travis here].

我尝试了几种方法: 1)有和没有.bowerrc文件

I tried several approaches: 1) with and without .bowerrc file

情况: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"
}

情况:2

{
    "directory": "public libs"
}

还尝试在[$ HOME/app-root/runtime/repo]中运行以下命令,并尝试通过SSH shell安装npm bower

Also, tried running following commands [In $HOME/app-root/runtime/repo] and tried npm install bower by SSH shell

 npm cache clear
 npm cache clean

任何帮助解决此问题的方法都会很棒.

Any help to resolve this would be great.

如果您想查看我的仓库,可以在这里找到它: https://github.com/prasunsultania /demoblog

In case you want to look at my repo you can find it here: https://github.com/prasunsultania/demoblog

推荐答案

这是我使用node.js墨盒在OpenShift上使用bower的方法:

Here is how I made use of bower on OpenShift using the node.js cartridge:

先决条件:

  • 通常,您已在全球范围内安装了Bower.
  • 推送到OpenShift的git repo必须易于配置为使用Bower,以便来自repo根的bower install可以完成工作.
  • Usually you have installed Bower globally.
  • The git repo which you push to OpenShift must be readily configured for using Bower so that bower install from the root of the repo will do the job.

必要步骤:

  1. 创建文件.openshift/action_hooks/deploy
  2. 在添加并将其提交到存储库之前,先执行chmod +x .openshift/action_hooks/deploy使其可执行.
  3. 将以下行添加到文件中:
  1. Create the file .openshift/action_hooks/deploy
  2. Do chmod +x .openshift/action_hooks/deploy to make it executable BEFORE you add and commit it to your repo
  3. Add the following lines to the file:

#!/usr/bin/env bash

HOME=$HOME/app-root/runtime
cd ~/repo
npm install bower
./node_modules/.bin/bower install

  1. 添加文件并将其提交到您的git repo
  2. 将您的git存储库推送到OpenShift

这篇关于无法在Openshift上安装凉亭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆