我有一个Angular 8项目,我运行了
ng add @angular/bazel
(在docs中指出)。
但是然后我得到这个错误:
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.
[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)
您可以通过运行自己尝试
ng add @angular/bazel
在this项目中。 (路径:/services/frontend
)
答案 0 :(得分:0)
我似乎更新了Angular CLI即可解决此问题。