【问题标题】:cannot deply angular app to openshift: "Argument error, options.body."无法将 Angular 应用程序部署到 openshift:“参数错误,options.body。”
【发布时间】:2020-04-09 14:23:46
【问题描述】:

我正在尝试将 angular8 应用程序部署到 Openshift。 我遵循了一些教程,并且正在尝试从命令行进行操作。 我创建了 package.json 文件,然后运行了这个命令:

>npx nodeshift --strictSSL=false --dockerImage=bucharestgold/centos7-s2i-web-app --imageTag=10.x --build.env OUTPUT_DIR=dist/readXchange-frontend --expose

我有一个错误,我在互联网上找不到任何东西,这里是日志:

2020-04-09T14:16:22.769Z INFO loading configuration
2020-04-09T14:16:22.814Z INFO using namespace readshare at https://api.us-east-2.starter.openshift-online.com:6443
2020-04-09T14:16:22.830Z WARNING a file property was not found in your package.json, archiving the current directory.
2020-04-09T14:16:22.830Z INFO creating archive of .editorconfig, .gitignore, angular.json, browserslist, dist, e2e, karma.conf.js, npx, package-lock.json, package.json, README.md, src, tsconfig.app.json, tsconfig.json, tsconfig.spec.json, tslint.json
2020-04-09T14:16:24.050Z INFO using existing build configuration read-xchange-frontend-s2i
2020-04-09T14:16:24.505Z INFO using existing image stream read-xchange-frontend
2020-04-09T14:16:24.511Z INFO uploading binary archive C:\Users\USER\CODE\angular\readXchange-frontend/tmp/nodeshift/build/archive.tar
2020-04-09T14:16:24.522Z ERROR Argument error, options.body

你们知道发生了什么吗?非常感谢!

【问题讨论】:

    标签: node.js angular kubernetes deployment openshift


    【解决方案1】:

    检查您的nodeshift 版本。最近在使用 3.1 时发生在我身上。升级到最新(6.0.2)解决了这个问题。

    【讨论】:

    • 一个依赖的依赖已更新,并且由于 nodeshift 指定版本范围的方式,它被引入。我们现在已经固定了这些依赖,所以事情又开始了。这是 github 问题的链接,用于查看损坏的 dep:github.com/nodeshift/openshift-rest-client/issues/209
    【解决方案2】:

    "bucharestgold/centos7-s2i-web-app" 已弃用,你应该试试这个https://github.com/nodeshift/ubi8-s2i-web-app

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-12
      • 2020-05-28
      相关资源
      最近更新 更多