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.

Documentation on Bazel does not work

See original GitHub issue

πŸ“š Docs or angular.io bug report

Description

A clear and concise description of the problem...

I want to use bazel on a new project with angular 8 or add it to an existing project

πŸ”¬ Minimal Reproduction

ng new --collection=@angular/bazel This is enough to give me the error

What’s the affected URL?**

https://angular.io/...

https://angular.io/guide/bazel

Reproduction Steps**

Run Cmd type in ng new --collection=@angular/bazel

Expected vs Actual Behavior**

image H:\angular>ng new --collection=@angular/bazel Schematic β€œapplication” not found in collection β€œ@angular/bazel”. Error: Schematic β€œapplication” not found in collection β€œ@angular/bazel”. at SchematicEngine.createSchematic (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\src\engine\engine.js:155:23) at CollectionImpl.createSchematic (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\src\engine\collection.js:12:29) at Object.getSchematic (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\utilities\schematics.js:36:23) at NewCommand.getOptions (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\models\schematic-command.js:195:40) at NewCommand.initialize (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\commands\new.js:48:21) at Object.<anonymous> (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js:87:23) at Generator.next (<anonymous>) at fulfilled (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js:4:58)

πŸ“·Screenshot

🌍 Your Environment

Windows 10

Browser info

chrome

Anything else relevant?

When trying to add bazel to an existing application, I faced a number of issues when trying to follow the β€˜documentation’ on Angular.Io

For example, as of now, I need bash installed on windows.

set PATH=C:\msys64\usr\bin;%PATH% set BAZEL_SH=C:\msys64\usr\bin\bash.exe If not I get this error: image

Maybe have a disclaimer that it wont be very easy to get custom material theme to work: https://github.com/bazelbuild/rules_sass/issues/98

I was unable to use yarn and had to switch to npm on existing angular application when trying to build with bazel. https://github.com/angular/angular/issues/30350

In the angular-metadata.tsconfig.json I had to add the line to exclude @angular/cli

    "node_modules/@angular/cli/**",
    "node_modules/@angular/bazel/**",
    "node_modules/@angular/**/schematics/**",
    "node_modules/@angular/**/testing/**",
    "node_modules/@angular/compiler-cli/**",
    "node_modules/@angular/common/upgrade*",
    "node_modules/@angular/router/upgrade*"
  ]```

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
kapunahelewongcommented, May 27, 2020

Status: Docs Team needs engineering input to know how to document bazel implementation correctly.

2reactions
kyliaucommented, Jul 22, 2020

Bazel support in @angular/angular has been deprecated in version 10. As part of the cleanup, we now redirect https://angular.io/guide/bazel to the migration doc. The Bazel effort is now wholly owned by the Bazel community. As mentioned in the migration doc, if you need help, please reach out to folks in the #angular channel in http://slack.bazel.build/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commands and Options | Bazel
Some commands, like build or test , can operate on a list of targets. They use a syntax more flexible than labels, which...
Read more >
Historical documentation - Bazel main
Bazel β€” Historical documentation​​ Welcome to the archived Bazel documentation! In February 2022, we migrated the documentation to create a better environmentΒ ...
Read more >
FAQ - Bazel
See our documentation on remote execution and caching and remote caching for ... This means that it is not good for running build...
Read more >
Working with External Dependencies - Bazel
Depending on non-Bazel projects. Rules prefixed with new_ , such as new_local_repository , allow you to create targets from projects that do not...
Read more >
Command-Line Reference | Bazel
See https://bazel.build/docs/bzlmod for more information. ... See https://github.com/bazelbuild/bazel/issues/8830 for details.
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