alexruizprado / azure-pipelines-angular-cli-task

Azure DevOps Pipelines task extension that can build, tests, lint, e2e an Angular project, or run a custom Angular CLI command.
MIT License
4 stars 3 forks source link

Angular CLI NOT found #25

Open Won5ki opened 3 years ago

Won5ki commented 3 years ago

Console throws error: Angular CLI extensions uses @angular/cli package located in the node_modules folder of an Angular application. even though a CLI package is present at the required location.

To Reproduce Steps to reproduce the behavior:

  1. Create Angular project.
  2. Install angular cli.
  3. Run task on Windows.
  4. See error.

Expected behavior No error, successful build.

Screenshots image image

Azure Devops Agent

Angular CLI:

Additional info: Seems like extension expects "/" path which is incorrect on windows platforms ("\")

sushilnyk commented 3 years ago

Do we have any solution on this issue ?. We got similar error after upgrading from angular 11 to angular 12 .

Schoesswendter commented 2 years ago

Did you find any solution yet? Until yesterday everything worked fine in our azure pipeline, but today we get the same error "Angular CLI not found." etc. npm install is performed before using the cli.

kkoranda commented 2 years ago

I am experiencing the same thing as @Schoesswendter - our deployment suddenly started throwing this error after working fine for months. There were no obvious changes to our project which seem like they would've caused this.

mpgalo commented 2 years ago

Same here. The pipeline are working and suddenly stoped. The NPM Install task is executing beforing angular CLI. And the Use NodeJs Task is with the same version that are working before (16.x)

nmylle commented 2 years ago

Same problem here

tcukanoot commented 2 years ago

Experiencing the same issue. Command line script will work in the meantime.

kkoranda commented 2 years ago

My coworker restored the older implementation of our pipeline steps and it seems to have fixed the issue. Not sure exactly why this resolved it, but previously our "Use Node" step had been disabled. Restoring that seemed to be the key to getting it working again.

Steps are: Use Node 16.10.0 npm install -> install -g @angular/cli@latest npm install -> install ng build

image

nmylle commented 2 years ago

After updating to angular v12, i'm getting the same error again, and the workaround doesn't work anymore. Anybody knows how to fix this?

image

emi662002 commented 1 year ago

Hi, I've found the fix: The problem is that you are using a non compatible node version (see logs: the current version of Node () is not supported by Angular.

If you inspect the code: https://github.com/alexruizprado/azure-pipelines-angular-cli-task/blob/master/Task1/Task1V1/index.ts any error thrown is being notified as "Angular CLI NOT found" (see line 28)

If you install in your build agent a Node version compatible with your Angular version you should be fine.

The actual problem is a bug in the error handling of this task.

vaniprakash commented 1 year ago

I am getting this issue in angular 15.0.5 Node 18.10.0. Please help me fixing this issue image

filipagh commented 9 months ago

in CI error logs if you have

Using Angular CLI 12.2.18
exec error: Warning: The current version of Node (16.20.2) is not supported by Angular.

.
.
.
##[error]Angular CLI was not found.

you need sync compatible version of ng cli and node https://angular.io/guide/versions