Search code examples
node.jsgithubdeploymentopenshiftredhat

why Red Hat OpenShift dosen't clone the project?


I was testing the project called adobot-io-master. instead of working with heroku i choose Red Hat OpenShift for this project and I got this error.

The project i was testing is adobot-io-master link is https://github.com/adonespitogo/AdoBot-IO

The error build is

    Cloning "https://github.com/adonespitogo/AdoBot-IO.git " ...
        Commit: 055663d38c91c2b61ba514e4cbf1469e8e0c36bb (Update README.md)
        Author: Adones Pitogo <pitogo.adones@gmail.com>
        Date:   Fri Feb 15 20:17:22 2019 +0800
    Pulling image "docker-registry.default.svc:5000/openshift/nodejs@sha256:b155814ac48feed9667b590a73f090367cbd7f64e34aaeb4dc70bfc8a4963ace" ...
    Using docker-registry.default.svc:5000/openshift/nodejs@sha256:b155814ac48feed9667b590a73f090367cbd7f64e34aaeb4dc70bfc8a4963ace as the s2i builder image
    ---> Installing application source
    ---> Building your Node application from source
    Current git config
    url.https://github.com.insteadof=git@github.com: 
    url.https://.insteadof=ssh:// 
    url.https://github.com.insteadof=ssh://git@github.com 
    core.repositoryformatversion=0
    core.filemode=true
    core.bare=false
    core.logallrefupdates=true
    remote.origin.url=https://github.com/adonespitogo/AdoBot-IO.git 
    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
    branch.master.remote=origin
    branch.master.merge=refs/heads/master
    ---> Installing dependencies
    ---> Using 'npm install -s --only=production'
    sh: run-s: command not found
    error: build error: non-zero (13) exit code from docker-registry.default.svc:5000/openshift/nodejs@sha256:b155814ac48feed9667b590a73f090367cbd7f64e34aaeb4dc70bfc8a4963ace

Can any one suggest me to how to do this?


Solution

  • It cannot find the command run-s. If you look at the package.json file you can see this:

        "postinstall": "run-s migrate build",
        "dev": "run-s build start"
    

    I guess it tries to do the postinstall task and it cannot find run-s command so it fails.

    Are you sure that you are using a good docker image that has npm/node installed to build your project?