Skip to content

Doesn't install when angular.json contains comments. #480

@hannson

Description

@hannson

🐞 Bug report

Description

If angular.json contains a comment then ng add @scullyio/init fails with an error.

Strictly speaking JSON should not contain comments but it is supported in Angular configuration and is added in some schemas.

Workaround

Remove any comment from angular.json (and/or possibly other json files parsed by @scully/init.

🔬 Minimal Reproduction

Add a comment to angular.json and try to install scully.

💻Your Environment

Angular Version:




Angular CLI: 9.1.0
Node: 13.13.0
OS: linux x64

Angular: 9.1.0
... animations, bazel, cli, common, compiler, compiler-cli, core
... forms, language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.0
@angular-devkit/build-angular     0.901.0
@angular-devkit/build-optimizer   0.901.0
@angular-devkit/build-webpack     0.901.0
@angular-devkit/core              9.1.0
@angular-devkit/schematics        9.1.0
@bazel/bazel                      2.1.0
@bazel/hide-bazel-files           1.5.0
@bazel/ibazel                     0.12.3
@bazel/karma                      1.5.0
@bazel/protractor                 1.5.0
@bazel/typescript                 1.5.0
@ngtools/webpack                  9.1.0
@schematics/angular               9.1.0
@schematics/update                0.901.0
rxjs                              6.5.4
typescript                        3.8.3
webpack                           4.42.0

Scully Version:
latest




"@scullyio/init": "0.0.25",
"@scullyio/ng-lib": "latest",
"@scullyio/scully": "latest",

🔥 Exception or Error




        error into import SculyLib
    Unexpected token / in JSON at position 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions