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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng new with bazel doesn't work #31233

Closed
striky1 opened this issue Jun 21, 2019 · 11 comments

Comments

Projects
None yet
5 participants
@striky1
Copy link

commented Jun 21, 2019

馃悶 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.

@alan-agius4 alan-agius4 transferred this issue from angular/angular-cli Jun 24, 2019

@ngbot ngbot bot added this to the needsTriage milestone Jun 24, 2019

@alan-agius4

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2019

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)

alan-agius4 added a commit to alan-agius4/angular that referenced this issue Jun 24, 2019

fix(bazel): update ng new schema to match the current ng new schema o鈥
鈥 @schematics/angular

The schema uses in ng-new bazel, include several outdated options. With this update we match the current version of @schematics/angular: https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

Relates to angular#31233

alan-agius4 added a commit to alan-agius4/angular that referenced this issue Jun 24, 2019

fix(bazel): update ng new schema to match the current ng new schema o鈥
鈥 @schematics/angular

The schema used in ng-new bazel, includes several outdated options. With this update we match the current version of @schematics/angular: https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

Relates to angular#31233

alan-agius4 added a commit to alan-agius4/angular that referenced this issue Jun 24, 2019

fix(bazel): update ng new schema to match the current ng new schema o鈥
鈥 @schematics/angular

The schema used in ng-new bazel, includes several outdated options. With this update we match the current version of @schematics/angular: https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

Relates to angular#31233

alan-agius4 added a commit to alan-agius4/angular that referenced this issue Jun 24, 2019

fix(bazel): update ng new schema to match the current ng new schema o鈥
鈥 @schematics/angular

The schema used in ng-new bazel, includes several outdated options. With this update we match the current version of @schematics/angular: https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

Relates to angular#31233
@kyliau

This comment has been minimized.

Copy link
Member

commented Jun 24, 2019

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.

@striky1

This comment has been minimized.

Copy link
Author

commented Jun 24, 2019

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.

kara added a commit that referenced this issue Jun 24, 2019

fix(bazel): update ng new schema to match the current ng new schema o鈥
鈥 @schematics/angular (#31234)

The schema used in ng-new bazel, includes several outdated options. With this update we match the current version of @schematics/angular: https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

Relates to #31233

PR Close #31234

kara added a commit that referenced this issue Jun 24, 2019

fix(bazel): update ng new schema to match the current ng new schema o鈥
鈥 @schematics/angular (#31234)

The schema used in ng-new bazel, includes several outdated options. With this update we match the current version of @schematics/angular: https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

Relates to #31233

PR Close #31234
@jeroenouw

This comment has been minimized.

Copy link

commented Jun 25, 2019

@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.

@striky1

This comment has been minimized.

Copy link
Author

commented Jun 26, 2019

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.

@jeroenouw

This comment has been minimized.

Copy link

commented Jun 26, 2019

@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.

@striky1

This comment has been minimized.

Copy link
Author

commented Jun 26, 2019

@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
@tja4472

This comment has been minimized.

Copy link

commented Jun 26, 2019

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

@striky1

This comment has been minimized.

Copy link
Author

commented Jun 26, 2019

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

@alan-agius4

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2019

@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

@striky1

This comment has been minimized.

Copy link
Author

commented Jul 8, 2019

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.