Sitelet https://web.archive.org/web/20200628004411/https://github.com/angular/angular/issues/35107
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on Bazel does not work #35107

Open
crh225 opened this issue Feb 2, 2020 · 3 comments
Open

Documentation on Bazel does not work #35107

crh225 opened this issue Feb 2, 2020 · 3 comments

Comments

@crh225
Copy link

@crh225 crh225 commented Feb 2, 2020 •

📚 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. (C:\Users\Chris\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js:87:23)
at Generator.next ()
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:
bazelbuild/rules_sass#98

I was unable to use yarn and had to switch to npm on existing angular application when trying to build with bazel.
#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*"
  ]```
@manklu
Copy link

@manklu manklu commented Feb 2, 2020

@crh225 There are several open issues with bazel on windows.

IMO its currently the best to use WSL 2 for bazel.
https://docs.microsoft.com/en-us/windows/wsl/wsl2-index

@crh225
Copy link
Author

@crh225 crh225 commented Feb 2, 2020

The bash script is one point of many of bazel not working is my point. The documentation, as is, makes it seem like it takes 5 minutes or less to enable bazel.

@mhevery mhevery added the comp: docs label Feb 4, 2020
@ngbot ngbot bot added this to the needsTriage milestone Feb 4, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Feb 5, 2020
@kapunahelewong kapunahelewong added this to Need Assistance from Eng. in docs Feb 5, 2020
@kapunahelewong
Copy link
Contributor

@kapunahelewong kapunahelewong commented May 27, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
docs
Need Assistance from Eng.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.