Azure Devops Angular not recognized

Viewed 780

I have a pipeline setup in Azure Devops to build an Angular application. The pipeline is setup such that I cache the npm packages. This pipeline worked fine for several months, but now it isn't recognizing angular when there is a cache hit. If I disable the cache step it works like normal. I have the same issue happening on 2 pieplines and figure something has changed in the azure dev ops backend. I attempted to add a step that would install Angular in the event that there was a cache hit, but the same issue still persisted.

Image of error message

Image of Cache Setup

1 Answers

This is because you need to have angular cli installed globally to have it recognized as a command:

npm install -g @angular/cli

But if you still want to have this installed locally please take a look here:

To run a locally installed version of the angular-cli, you can call ng commands directly by adding the .bin folder within your local node_modules folder to your PATH. The node_modules and .bin folders are created in the directory where npm install @angular/cli was run upon completion of the install command.

Related