Skip to content

Invalid JSON character when running ng update @angular/cli #10715

@cado1982

Description

@cado1982

Versions

Angular CLI: 6.0.0
Node: 8.11.1
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         6.1.0
typescript                   2.7.2

Repro steps

  • npm install -g @angular/cli
  • npm install @angular/cli@latest
  • ng update @angular/cli

Observed behavior

Invalid JSON character: "" at 0:0.

Desired behavior

Configuration should be migrated to the new angular.json format. If there is a problem, an understandable error message should be shown.

Mention any other details that might be useful (optional)

.angular-cli.json

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "project": {
    "name": "<removed>"
  },
  "apps": [
    {
      "root": "Client",
      "outDir": "wwwroot",
      "assets": [
        "favicon.ico"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "<removed>",
      "styles": [
        "../node_modules/@clr/icons/clr-icons.min.css",
        "../node_modules/@clr/ui/clr-ui.min.css",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
        "../node_modules/tether-drop/dist/css/drop-theme-arrows.css",
        "../node_modules/tether-drop/dist/css/drop-theme-arrows-bounce.css",
        "styles.scss"
      ],
      "scripts": [
        "../node_modules/@webcomponents/custom-elements/custom-elements.min.js",
        "../node_modules/@clr/icons/clr-icons.min.js",
        "../node_modules/tether/dist/js/tether.min.js",        
        "../node_modules/tether-drop/dist/js/drop.min.js"
      ],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ],
  "e2e": {
    "protractor": {
      "config": "protractor.conf.js"
    }
  },
  "lint": [
    {
      "files": "Client/**/*.ts",
      "project": "tsconfig.app.json"
    },
    {
      "files": "Client/**/*.ts",
      "project": "tsconfig.spec.json"
    },
    {
      "files": "Client/**/*.ts",
      "project": "e2e/tsconfig.e2e.json"
    }
  ],
  "test": {
    "karma": {
      "config": "karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "scss",
    "serve": {
      "ssl": true,
      "sslCert": "server.cert",
      "sslKey": "server.key"
    },
    "component": {}
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions