Skip to content

tsconfig with comments breaks ng add @nguniversal/express-engine #14371

Closed
@Ionaru

Description

@Ionaru

🐞 Bug report

Command (mark with an x)

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

Description

A tsconfig.app.json file with comments will cause ng add @nguniversal/express-engine to error after installing @nguniversal/express-engine.

🔬 Minimal Reproduction

  1. ng new myApp
  2. Enter through all questions (use defaults)
  3. cd myApp
  4. Edit tsconfig.app.json and add a comment anywhere in the file.
  5. ng add @nguniversal/express-engine --clientProject myApp

🔥 Exception or Error

Invalid JSON character: "S" at 2:4.

🌍 Your Environment

Angular CLI: 7.3.9
Node: 12.1.0
OS: linux x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.9
@angular-devkit/build-optimizer   0.13.9
@angular-devkit/build-webpack     0.13.9
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cli                      7.3.9
@ngtools/webpack                  7.3.9
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.29.0

Anything else relevant?

TypeScript has allowed comments in tsconfig files since microsoft/TypeScript#5450 was merged.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions