为什么Red Hat OpenShift不克隆项目?

时间:2019-04-19 08:25:35

标签: node.js github deployment openshift redhat

我正在测试一个名为adobot-io-master的项目。而不是与heroku一起工作,我为此项目选择了Red Hat OpenShift,但出现了此错误。

我正在测试的项目是adobot-io-master链接是 https://github.com/adonespitogo/AdoBot-IO

错误构建是

    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

有人可以建议我怎么做吗?

1 个答案:

答案 0 :(得分:0)

它找不到命令run-s。如果查看package.json文件,您会看到以下内容:

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

我猜它尝试执行postinstall任务,但找不到run-s命令,因此失败。

确定要使用安装了 npm / node 的良好Docker映像来构建项目吗?