Skip to content

ng new with bazel doesn't work #31233

Closed
Closed

Description

@striky1

🐞 Bug report

Command (mark with an x)

- [ x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

I didn't testing previous version of CLI/Bazel.

Description

I tried to create new application with integration of Bazel but it not works in the beginning (without Bazel within Ivy is working well)

🔬 Minimal Reproduction

  1. ng new my-app --collection=@angular/bazel --enable-ivy

🔥 Exception or Error


Schematic input does not validate against the Schema: {"enableIvy":true,"name":"my-app --collection=@angular/bazel","version":"8.1.0-beta.2","routing":true,"style":"scss"}
Errors:

  Data path ".name" should match format "html-selector".

🌍 Your Environment


Angular CLI: 8.1.0-beta.2
Node: 12.4.0
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.801.0-beta.2
@angular-devkit/core         8.1.0-beta.2
@angular-devkit/schematics   8.1.0-beta.2
@schematics/angular          8.1.0-beta.2
@schematics/update           0.801.0-beta.2
rxjs                         6.4.0

NodeJS v12.4.0
NPM v6.9.0
MacOS v10.14.5

Anything else relevant?

I tried uninstall @angular/cli + @angular/bazel and then install back with @next suffix on both of them, but still it doesn't work.

Activity

  1. added
    area: bazelIssues related to the published `@angular/bazel` build rules
    on Jun 24, 2019
  2. added this to the needsTriage milestone on Jun 24, 2019
  3. alan-agius4 commented on Jun 24, 2019

    @alan-agius4
    Contributor

    AFAIK, Ivy is not yet supported by @angular/bazel package, @kyliau, can you confirm?, Also, the arguments are not being parsed properly as the schema is outdated. (Will do a PR to address the later)

  4. kyliau commented on Jun 24, 2019

    @kyliau
    Contributor

    AFAIK, Ivy is not yet supported by @angular/bazel package, @kyliau, can you confirm?, Also, the arguments are not being parsed properly as the schema is outdated. (Will do a PR to address the later)

    Yes, the Bazel schematics does not support Ivy yet. I've created a JIRA work item to look into this.

  5. striky1 commented on Jun 24, 2019

    @striky1
    Author

    Ty, guys. I needed change node version back to stable version, but, if I'm not wrong I had same error if I tried create new app without ivy within bazel. I'll do this test again tomorrow and I'll let u know.

  6. jeroenouw commented on Jun 25, 2019

    @jeroenouw

    @striky1 did you run this command already before your ran ng new?: npm install -g @angular/bazel@latest

    And maybe good to install everything globally @latest instead of the @next. For me, this works.

  7. striky1 commented on Jun 26, 2019

    @striky1
    Author

    I tested it right now one more time to create new app without --enable-ivy command and it still not works.

    Command: ng new my-app --collection=@angular/bazel
    Error:

    Schematic input does not validate against the Schema: {"name":"my-app --collection=@angular/bazel","version":"8.1.0-beta.3","routing":true,"style":"scss"}
    Errors:

    Data path ".name" should match format "html-selector".

    Versions:

    Angular CLI: 8.1.0-beta.3 Node: 12.4.0 OS: darwin x64 Angular: ...

    Package Version

    @angular-devkit/architect 0.801.0-beta.3
    @angular-devkit/core 8.1.0-beta.3
    @angular-devkit/schematics 8.1.0-beta.3
    @schematics/angular 8.1.0-beta.3
    @schematics/update 0.801.0-beta.3
    rxjs 6.4.0
    npm 6.9.0
    @angular/bazel@8.1.0-next.3

    I tried also do combinations of @latest or @next bazel version within v10.16.0 version of NodeJS but it not helps.

    @kyliau do u have some idea what I did wrong? 🤔


    @jeroenouw yep, of course, I did this command. I followed this article: https://blog.angular.io/try-bazels-opt-in-preview-in-angular-cli-b9430bd00e82 . Also I tried uninstall and install back @angular/bazel with @latest suffix and still I got same error.

  8. jeroenouw commented on Jun 26, 2019

    @jeroenouw

    @striky1 I also meant to do the @latest for the following packages:

    @angular-devkit/core         8.1.0-beta.3
    @angular-devkit/schematics   8.1.0-beta.3
    @schematics/angular          8.1.0-beta.3
    @schematics/update           0.801.0-beta.3
    
    

    You are still using beta packages here.

  9. striky1 commented on Jun 26, 2019

    @striky1
    Author

    @jeroenouw yep, u are right. My bad, sorry.

    I tried it again and ran these commands:

    npm i -g @angular/cli@latest - everything was ok
    npm i -g @angular/bazel@latest - gave me warnings about depedancies:

    
    npm WARN @angular/bazel@8.0.2 requires a peer of @angular/compiler-cli@8.0.2 but none is installed. You must install peer dependencies yourself.
    npm WARN @angular/bazel@8.0.2 requires a peer of @bazel/typescript@0.* but none is installed. You must install peer dependencies yourself.
    npm WARN @angular/bazel@8.0.2 requires a peer of typescript@>=3.4 <3.5 but none is installed. You must install peer dependencies yourself.
    

    So, I ran this commands:

    npm i -g @angular/compiler-cli@latest
    npm i -g @angular/compiler@latest (because is it dependancy for compiler-cli)
    npm i -g typescript@3.4.5 (because of compiler-cli@8.0.2 requires a peer of typescript@>=3.4 <3.5)
    npm i -g @bazel/typescript@latest

    Finally, I ran command:

    ng new my-app --collection=@angular/bazel

    Result:

    
    ? Would you like to add Angular routing? Yes
    ? Which stylesheet format would you like to use? SCSS   [ http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax ]
    Schematic input does not validate against the Schema: {"name":"my-app --collection=@angular/bazel","version":"8.0.4","routing":true,"style":"scss"}
    Errors:
    
      Data path ".name" should match format "html-selector".
    

    CLI:

    
    Angular CLI: 8.0.4
    Node: 12.4.0
    OS: darwin x64
    Angular: 
    ... 
    
    Package                      Version
    ------------------------------------------------------
    @angular-devkit/architect    0.800.4
    @angular-devkit/core         8.0.4
    @angular-devkit/schematics   8.0.4
    @schematics/angular          8.0.4
    @schematics/update           0.800.4
    rxjs                         6.4.0
    
  10. tja4472 commented on Jun 26, 2019

    @tja4472

    FWIW: I've just done this, but I picked CSS as stylesheet format.

  11. striky1 commented on Jun 26, 2019

    @striky1
    Author

    @tja4472 yep, I tried it too but it not helps. I'm confused 🙃

  12. alan-agius4 commented on Jun 26, 2019

    @alan-agius4
    Contributor

    @striky1, your problem is due to a hairline space which is in your command, and node is unable to separate the args properly.

    Try using this command ng new my-app --collection=@angular/bazel

  13. striky1 commented on Jul 8, 2019

    @striky1
    Author

    @alan-agius4 Awesome, ty! It works. Everything is on @latest versions (see bellow) and ng new was successful.

    CLI:

    
    Angular CLI: 8.1.0
    Node: 12.6.0
    OS: darwin x64
    Angular: 
    ... 
    
    Package                      Version
    ------------------------------------------------------
    @angular-devkit/architect    0.801.0
    @angular-devkit/core         8.1.0
    @angular-devkit/schematics   8.1.0
    @schematics/angular          8.1.0
    @schematics/update           0.801.0
    rxjs                         6.4.0
    
  14. angular-automatic-lock-bot commented on Sep 15, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  15. locked and limited conversation to collaborators on Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: bazelIssues related to the published `@angular/bazel` build rules

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions