简体   繁体   English

Gitlab CI构建无法正常工作

[英]Gitlab CI build not working

I have tried to start with Gitlab's CI using their YAML file. 我尝试使用其YAML文件从Gitlab的CI开始。 My repo houses an angular 2 application that on build needs to run e2e and unit tests, so one of the lines in the script tries to install the dependancy via NPM to provide this functionality but always fails astronomically, below is my YAML script and an example of an error I come across that tends to vary for some unknown reason. 我的存储库中包含一个angular 2应用程序,该应用程序在构建时需要运行e2e和单元测试,因此脚本中的其中一行尝试通过NPM安装依赖项以提供此功能,但始终会失败,以下是我的YAML脚本和一个示例我遇到的错误,由于某些未知原因而趋于变化。

before_script:
   - apt-get update -y && apt-get upgrade -y 
   - apt-get install -y nodejs
   - apt-get install -y npm
   - npm update npm -g
   - npm cache clean
   - npm install -g angular-cli 


test:
  script:
   - ng test
   - ng e2e

我得到的错误之一的示例

Try changing npm install -g angular-cli to npm install -g @angular/cli . 尝试将npm install -g angular-cli更改为npm install -g @angular/cli The previous has been deprecated. 以前的版本已被弃用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM