2

I have tried to start with Gitlab's CI using their YAML file. 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.

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

Example of one of the errors I get

1
  • 1
    The error is quite explicit in the message, the packages don't exist? Have you tried a local reproduction of the commands? Commented May 31, 2017 at 20:55

1 Answer 1

2

Try changing npm install -g angular-cli to npm install -g @angular/cli. The previous has been deprecated.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.