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

Bazel opt in : ng add @angular/bazel fails #14933

Closed
hugodes opened this issue Jun 28, 2019 · 10 comments · Fixed by #15026
Closed

Bazel opt in : ng add @angular/bazel fails #14933

hugodes opened this issue Jun 28, 2019 · 10 comments · Fixed by #15026
Labels
area: @angular-devkit/core freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix
Milestone

Comments

@hugodes
Copy link

hugodes commented Jun 28, 2019

🐞 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/cdk@8.0.1 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/cdk@8.0.1 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/material@8.0.1 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/material@8.0.1 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/material@8.0.1 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/material@8.0.1 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/material-moment-adapter@8.0.1 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/effects@8.0.1 requires a peer of @angular/core@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngrx/store@8.0.1 requires a peer of @angular/core@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/bazel@8.0.3 requires a peer of @angular/compiler-cli@8.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/bazel@8.0.3 requires a peer of @bazel/typescript@0.* but none is installed. You must install peer dependencies yourself.

+ @angular/bazel@8.0.3
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?

@alan-agius4
Copy link
Collaborator

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

@hugodes
Copy link
Author

hugodes commented Jun 28, 2019

Hi @alan-agius4,

Same thing here


[...]
+ @angular/bazel@8.1.0-rc.0
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.

@alan-agius4
Copy link
Collaborator

Is it possible to share a reproduction?

@hugodes
Copy link
Author

hugodes commented Jun 28, 2019

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

@elvisbegovic
Copy link
Contributor

elvisbegovic commented Jun 28, 2019

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

@hugodes
Copy link
Author

hugodes commented Jun 28, 2019

Hey again @istiti ,

Sure here you go:
angular.zip

@elvisbegovic
Copy link
Contributor

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

@hugodes
Copy link
Author

hugodes commented Jun 28, 2019

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

?

@alan-agius4
Copy link
Collaborator

Yeah it is.

@ngbot ngbot bot added this to the needsTriage milestone Jun 28, 2019
@alan-agius4 alan-agius4 added the freq1: low Only reported by a handful of users who observe it rarely label Jun 28, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 28, 2019
kyliau pushed a commit that referenced this issue Jul 9, 2019
kyliau pushed a commit that referenced this issue Jul 9, 2019
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/core freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants