angularnpm

Angular npm Dependabot issues on git


I try to make the Dependabot update on Angular.

error screenshot

To fix them I have executed npm audit fix --force command. This command did the necessary fixes on the packages. I have CI/CD integrated to my code on the main branch. Once it push the code to git main branch, the pipeline stopped executing.

cicd

Does anyone know why?


Solution

  • Based on the error you posted in the comment. Pease check your angular.json file whether it's configure in the below way or not

    If browser target not suitable to you then change it to buildtarget.
    For more details: Data path "" must have required property 'browserTarget'

    "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "browserTarget": "my-app:build"
      },
      "configurations": {
        "production": {
          "browserTarget": "my-app:build:production"
        },
        "development": {
          "browserTarget": "my-app:build:development"
        }
      }
    }