12

Running command npm run ngcc throws the error 'ngcc' is not recognized as an internal or external command.

package.json

{
  "scripts": {
    "ngcc": "ngcc"
    ...
  },
  "dependencies": {
    "@angular-extensions/elements": "^9.3.0",
    "@angular/animations": "~9.1.0",
    "@angular/common": "~9.1.0",
    "@angular/compiler": "~9.1.0",
    "@angular/core": "~9.1.0",
    "@angular/elements": "~9.1.0",
    "@angular/forms": "~9.1.0",
    "@angular/platform-browser": "~9.1.0",
    "@angular/platform-browser-dynamic": "~9.1.0",
    "@angular/router": "~9.1.0",
    ...
  }
}

Is there any mismatch in the version of anuglar-compiler and other packages? Not able to find the root cause of the issue. Can someone please help?

user12023283
  • 179
  • 1
  • 1
  • 9

1 Answers1

11

Have you tried running "npm ci"? It fixed the problem for me, it seems my cli was not correctly installed. https://preview-docs.npmjs.com/cli-commands/npm-ci

Diogo Poeira
  • 119
  • 2
  • 3