Angular-cli: Bazel opt in : ng add @angular/bazel fails

Created on 28 Jun 2019  路  10Comments  路  Source: angular/angular-cli

馃悶 Bug report

Command (mark with an x)


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

Description

I followed the steps here for using Bazel in out existing application and got this error:


$ ng add @angular/bazel
Unable to find compatible package.  Using 'latest'.
Installing packages for tooling via npm.
npm WARN @angular/[email protected] requires a peer of @angular/core@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/animations@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/core@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/forms@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/core@^8.0.0 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngrx/[email protected] requires a peer of @angular/core@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngrx/[email protected] requires a peer of @angular/core@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @bazel/typescript@0.* but none is installed. You must install peer dependencies yourself.

+ @angular/[email protected]
added 32 packages from 85 contributors and audited 26308 packages in 9.563s
found 0 vulnerabilities

Installed packages for tooling via npm.
Invalid JSON character: "]" at 20:11.

馃敩 Minimal Reproduction

There is no stack trace so I don't even know which file the error is coming from

馃敟 Exception or Error


Invalid JSON character: "]" at 20:11.

馃實 Your Environment



Angular CLI: 8.1.0-rc.0
Node: 10.16.0
OS: darwin x64
Angular: 8.1.0-rc.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.801.0-rc.0
@angular-devkit/build-angular      0.801.0-rc.0
@angular-devkit/build-optimizer    0.801.0-rc.0
@angular-devkit/build-webpack      0.801.0-rc.0
@angular-devkit/core               8.1.0-rc.0
@angular-devkit/schematics         8.1.0-rc.0
@angular/bazel                     8.0.3
@angular/cdk                       8.0.1
@angular/material                  8.0.1
@angular/material-moment-adapter   8.0.1
@ngtools/webpack                   8.1.0-rc.0
@schematics/angular                8.1.0-rc.0
@schematics/update                 0.801.0-rc.0
rxjs                               6.5.2
typescript                         3.4.5
webpack                            4.35.0

Anything else relevant?

devkicore low confusing bufix

Most helpful comment

@istiti thanks !

Do you think it would be a good idea to change the error from:

Invalid JSON character: "]" at 20:11.

to

angular.json: Invalid JSON character: "]" at 20:11.

?

All 10 comments

Hi, can you try to use ng add @angular/bazel@next?

Hi @alan-agius4,

Same thing here


[...]
+ @angular/[email protected]
added 32 packages from 85 contributors and audited 26308 packages in 9.993s
found 0 vulnerabilities

Installed packages for tooling via npm.
Invalid JSON character: "]" at 20:11.

Is it possible to share a reproduction?

@alan-agius4 I can, but privately.

I would try to reproduce it in a public repo but error doesn't give me any insight as to which file this is coming from.

@hugodes can you share all your *.json files (ie. angular.json, tsconfig.json, tslint.json...) related to angular ? In a zip please

Hey again @istiti ,

Sure here you go:
angular.zip

Ok, In your angular.json you have a unnecessary comma at line 20 "src/assets",
Even if you remove it it will not compile do to many others comma, please delete theme in line 20, 155, 183, 184, 233

Then retry temporary by running npm uninstall @angular/bazel then ng add @angular/bazel@next

@istiti thanks !

Do you think it would be a good idea to change the error from:

Invalid JSON character: "]" at 20:11.

to

angular.json: Invalid JSON character: "]" at 20:11.

?

Yeah it is.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MateenKadwaikar picture MateenKadwaikar  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments

purushottamjha picture purushottamjha  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments

5amfung picture 5amfung  路  3Comments