Scenario:

One of our developer was getting this error, after she took the latest code of DevOps. This application was angular 11 with ASP.net core 3.1.

Exact Error:

AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script ‘start’ exited without indicating that the Angular CLI was listening for requests. The error output was: An unhandled exception occurred: Cannot find module ‘posix-character-classes’

After a bit of research, we found that we found that we need to update angular and npm version.

Command:

npm update 
ng update
// alternatively
npm update -g
np update -g

However, this solution did not work in our case. Furthermore research, I observed that clientApp’s (angular application) folder was having node_modules folder from Azure DevOps as shown.

This was supposed to create based on user build and not from source control. Therefore, I deleted the folder from the angular application and rebuild the solution. And this time it works and resolved the issue.

Solution:

Remove the node_modules folder from angular application.

ng serve –open

Regards

Rijwan

Leave a Reply

Your email address will not be published. Required fields are marked *