question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Schematic "ng-add" not found in collection "@angular/bazel".

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/bazel

Is this a regression?

I don’t know

Description

ng add @angular/bazel fails (even if i retry).

πŸ”¬ Minimal Reproduction

cd my-huge-angular-poject
node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng add @angular/bazel

πŸ”₯ Exception or Error


$ yarn ngx add @angular/bazel
yarn run v1.15.2
$ node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng add @angular/bazel
Installing packages for tooling via yarn.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["object-assign@latest"] is trying to unpack in the same destination "C:\\Users\\M4938423\\AppData\\Local\\Yarn\\Cache\\v4\\npm-object-assign-4.1.1-2109adc7965887cfc05cbbd442cac8bfbb360863\\node_modules\\object-assign" as pattern ["object-assign@^4.1.1","object-assign@^4.0.1","object-assign@^4.1.0","object-assign@^4","object-assign@^4.1.0","object-assign@^4.0.1","object-assign@^4.1.0","object-assign@^4.0.1","object-assign@^4.0.1"]. This could result in non-deterministic behavior, skipping.
info fsevents@1.2.7: The platform "win32" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.0.7: The platform "win32" is incompatible with this module.
info "fsevents@2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @ng-bootstrap/ng-bootstrap@4.2.1" has incorrect peer dependency "@angular/common@^7.0.0".
warning " > @ng-bootstrap/ng-bootstrap@4.2.1" has incorrect peer dependency "@angular/core@^7.0.0".
warning " > @ng-bootstrap/ng-bootstrap@4.2.1" has incorrect peer dependency "@angular/forms@^7.0.0".
warning " > @ngrx/effects@7.3.0" has incorrect peer dependency "@angular/core@^7.0.0".
warning " > @ngrx/router-store@7.3.0" has incorrect peer dependency "@angular/common@^7.0.0".
warning " > @ngrx/router-store@7.3.0" has incorrect peer dependency "@angular/core@^7.0.0".
warning " > @ngrx/router-store@7.3.0" has incorrect peer dependency "@angular/router@^7.0.0".
warning " > @ngrx/store@7.3.0" has incorrect peer dependency "@angular/core@^7.0.0".
warning " > ng-dynamic-component@4.0.3" has incorrect peer dependency "@angular/common@^7.0.0".
warning " > ng-dynamic-component@4.0.3" has incorrect peer dependency "@angular/core@^7.0.0".
warning " > @angular/bazel@7.2.9" has incorrect peer dependency "@angular/compiler-cli@7.2.9".
warning " > @angular/bazel@7.2.9" has incorrect peer dependency "typescript@>=3.1.1 <3.3".
warning "@angular/bazel > tsickle@0.34.0" has incorrect peer dependency "typescript@~3.1.3 || ~3.2.0-rc".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 11 new dependencies.
info Direct dependencies
└─ @angular/bazel@7.2.9
info All dependencies
β”œβ”€ @angular/bazel@7.2.9
β”œβ”€ @bazel/typescript@0.26.0
β”œβ”€ ascli@1.0.1
β”œβ”€ bytebuffer@5.0.1
β”œβ”€ colour@0.7.1
β”œβ”€ long@3.2.0
β”œβ”€ optjs@3.2.2
β”œβ”€ protobufjs@5.0.3
β”œβ”€ shelljs@0.8.2
β”œβ”€ tsickle@0.34.0
└─ window-size@0.1.4
Installed packages for tooling via yarn.
Schematic "ng-add" not found in collection "@angular/bazel".
Error: Schematic "ng-add" not found in collection "@angular/bazel".

🌍 Your Environment

Angular Version:


Angular CLI: 8.0.1
Node: 10.16.0
OS: win32 x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.800.1
@angular-devkit/build-angular      0.800.1
@angular-devkit/build-ng-packagr   0.800.1
@angular-devkit/build-optimizer    0.800.1
@angular-devkit/build-webpack      0.800.1
@angular-devkit/core               8.0.1
@angular-devkit/schematics         8.0.1
@angular/bazel                     7.2.9
@angular/cdk                       7.3.5
@angular/cli                       8.0.1
@bazel/typescript                  0.26.0
@ngtools/json-schema               1.1.0
@ngtools/webpack                   8.0.1
@schematics/angular                8.0.1
@schematics/update                 0.800.1
ng-packagr                         5.2.0
rxjs                               6.5.2
typescript                         3.4.5
webpack                            4.30.0

Anything else relevant? Project was angular7. I used ng update @angular/cli @angular/core to upgrade to angular 8. No specific issue during the process.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
alan-agius4commented, Jun 6, 2019

I think you tagged the wrong person πŸ˜› Glad it worked out for you πŸ˜ƒ

1reaction
alan-agius4commented, Jun 6, 2019

Hi, from the first logs it looks like it’s trying to install @angular/bazel@7.2.9 which typically means that your local cli version is 7.x.x.

The @angular/bazel schematics are only available in version 8.x.x+

With regards to the later issue, it is a known and should be addressed in https://github.com/angular/angular/pull/30825

Read more comments on GitHub >

github_iconTop Results From Across the Web

An unhandled exception occurred: Schematic "ng-add" not ...
I seems as if updating the Angular CLI fixed the issue.
Read more >
Schematic "page" not found in collection "@schematics/angular".
An unhandled exception occurred: Schematic "pages/test" not found in collection ... npm uninstall @schematics/angular and installed it again.
Read more >
Introducing Bazel Schematics for Angular CLI - Minko Gechev
In this blog post, we want to share our new schematics for Angular CLI which provide Bazel build support. You can find the...
Read more >
Build your Angular application with Bazel | Ninja Squad
Starting a new project with Bazel. The Angular team wrote a collection of schematics that you can install globally: npm i -g @angular/bazel....
Read more >
How to Try Angular CLI with Bazel | by Suguru Inatomi - Medium
Not mentioned in Minko's post, Angular Bazel needs… ... we want to share our new schematics for Angular CLI which provide Bazel build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found