Unable to install gazebo on Openshift

I can not install the gazebo on Openshift. I keep 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 

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

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

case: 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" } 

case: 2

 { "directory": "public libs" } 

In addition, I tried the following commands [In $ HOME / app-root / runtime / repo] and tried to install nower install using the SSH shell

  npm cache clear npm cache clean 

Any help to solve this problem would be great.

If you want to see my repo, you can find it here: https://github.com/prasunsultania/demoblog

+7
bower openshift
source share
3 answers

Here's how I used bower in OpenShift with a node.js cartridge:

Prerequisites:

  • You usually installed Bower globally.
  • The git repo that you click on OpenShift should be easily configured to use Bower so that bower install from the root of the repo bower install job.

Necessary steps:

  • Create a .openshift/action_hooks/deploy file
  • Do chmod +x .openshift/action_hooks/deploy to make it executable before you add and commit it in your repo
  • 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. Add and commit file in git repo
  2. Configure git repository on OpenShift
+16
source share

This suggests the following approach:

  • Add dependency "bower": "latest" - package.json
  • Add script for postinstall:

     "scripts": { ... "postinstall": "HOME=$OPENSHIFT_REPO_DIR bower install || bower install" }, 
+6
source share

well, for every time you need to use bower install , you can use export HOME=$HOME/app-root/runtime/repo in the RHC tool and then in the './app-root/repo' folder you can use bower install , if the bower command bower not available, go to the ". / nodejs "and run npm install bower .

Then, to the RHC tool (this worked perfectly for me):

  • 1 - rhc ssh proyect-name
  • 2 - cd nodejs
  • 3 - npm install bower
  • 4 - cd ..
  • 5 - export HOME=$HOME/app-root/runtime/repo
  • 6 - cd app-root/repo
  • 7 - bower install

made! good luck in your projects

0
source share

All Articles