2

I have a build process (TFS) for gated check-ins. The build does the follow:

  • Get latest soruce
  • npm install
  • npm run build
  • npm run build:test
  • more stuff...

The npm install part takes 2.9 minutes mostly because it installs angular-cli. I have the angular-cli installed globally on the machine, why can't I use the global installation?

If I try to remove @angular/cli from my devDependencies, I got the error:

You have to be inside an angular-cli project in order to use the build command after reinstall of angular-cli

Versions:

1
  • if I had to make a guess, I would think you probably have an older beta of angular-cli installed globally (beta.28 or earlier). The angular CLI project has changed from angular-cli to @angular/cli, and projects created with @angular/cli aren't compatible with the older releases. Commented Jun 11, 2017 at 15:33

1 Answer 1

1

I'm not sure if you can remove the local install of @angular/cli, but I agree, this would be nice. To speed up you installs, switch from using npm to a faster package manager yarn. After installing yarn, your commands will look slightly different:

yarn install
yarn run build
yarn run build:test

But you'll definitely see the speed improvement. I blogged about Yarn here https://yakovfain.com/2016/11/06/angular-cli-speed-up-installing-dependencies-with-yarn

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.