Search code examples
angularangular-cliangular8bazel

An unhandled exception occurred: Schematic "ng-add" not found in collection "@angular/bazel"


I have an Angular 8 project and I ran

ng add @angular/bazel

on it (as pointed out in the docs). But then I get this error:

Error

Unable to find compatible package.  Using 'latest'.
Installing packages for tooling via yarn.
Installed packages for tooling via yarn.
An unhandled exception occurred: Schematic "ng-add" not found in collection "@angular/bazel".
See "/tmp/ng-WJmXSk/angular-errors.log" for further details.

Log File

[error] Error: Schematic "ng-add" not found in collection "@angular/bazel".
    at SchematicEngine.createSchematic (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/src/engine/engine.js:232:23)
    at CollectionImpl.createSchematic (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/src/engine/engine.js:69:29)
    at AddCommand.getSchematic (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/models/schematic-command.js:135:27)
    at AddCommand.runSchematic (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/models/schematic-command.js:291:32)
    at AddCommand.executeSchematic (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/commands/add-impl.js:148:31)
    at AddCommand.run (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/commands/add-impl.js:45:25)
    at AddCommand.validateAndRun (/home/flolu/Desktop/cents-ideas/services/frontend/node_modules/@angular/cli/models/command.js:134:39)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

You can try it yourself by running

ng add @angular/bazel

in this project. (path: /services/frontend)


Solution

  • I seems as if updating the Angular CLI fixed the issue.