Угловое обновление CLI неожиданного токена в позиции 0 - PullRequest
0 голосов
/ 15 марта 2019

Я следую рекомендациям по обновлению angular. И сделали следующие шаги

npm install -g @angular/cli, npm install @angular/cli, ng update @angular/cli

Первые два шага прошли нормально, но на последнем шаге я получаю

 unexpected token at position 0

Я сейчас на

Angular CLI: 1.7.4 Node: 8.11.3 OS: win32 x64 Angular: 5.2.11

Вот так выглядит мой .angular-cli.json

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "project": {
    "name": "client-app"
  },
  "apps": [
    {
      "name": "contentstudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/contentstudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/contentstudio"
        ]
      },
      "scripts": [
        "../node_modules/jquery/dist/jquery.js",
        "../node_modules/owl.carousel/dist/owl.carousel.js"
      ],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "productstudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/productstudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/productstudio"
        ]
      },
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "TrainingStudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/TrainingStudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/TrainingStudio"
        ]
      },
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "StoreStudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/storestudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/storestudio"
        ]
      },
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "linkstudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/linkstudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/linkstudio"
        ]
      },
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "collaborationstudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "collaborationmain.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/collaborationstudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/collaborationstudio"
        ]
      },
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "attributestudio",
      "root": "src",
      "outDir": "./dist",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/attributestudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/attributestudio"
        ]
      },
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "root": "src",
      "outDir": "./dist",
      "name": "supportstudio",
      "assets": [
        "assets"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "assets/css/supportstudio/styles.scss",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/ng2-toastr/bundles/ng2-toastr.min.css"
      ],
      "stylePreprocessorOptions": {
        "includePaths": [
          "assets/css/supportstudio"
        ]
      },
      "scripts": [
        "../node_modules/jquery/dist/jquery.js",
        "../node_modules/owl.carousel/dist/owl.carousel.js"
      ],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "lint": [
    {
      "project": "src/tsconfig.app.json",
      "exclude": "**/node_modules/**"
    },
    {
      "project": "src/tsconfig.spec.json",
      "exclude": "**/node_modules/**"
    },
    {
      "project": "e2e/tsconfig.e2e.json",
      "exclude": "**/node_modules/**"
    }
  ],
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "scss",
    "component": {
      "spec": false
    }
  }
}

Package.json добавлено

{
  "name": "client-app",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/flex-layout": "^2.0.0-beta.10-4905443",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "@handsontable/angular": "^2.0.0",
    "@ng-bootstrap/ng-bootstrap": "^1.1.2",
    "@swimlane/dragula": "^3.7.3",
    "@swimlane/ngx-datatable": "^11.3.2",
    "@swimlane/ngx-dnd": "^3.2.0",
    "@types/file-saver": "^1.3.1",
    "@types/html2canvas": "0.0.33",
    "ang-jsoneditor": "^1.6.2",
    "angular-confirmation-popover": "^4.1.0",
    "angular-font-awesome": "^3.1.2",
    "angular-split": "^1.0.3",
    "angular2-multiselect-dropdown": "^2.9.1",
    "angular2-prettyjson": "^3.0.1",
    "core-js": "^2.4.1",
    "deep-object-diff": "^1.1.0",
    "easy-json-schema": "0.0.2-beta",
    "edit-json-file": "^1.2.0",
    "file-saver": "^2.0.0-rc.3",
    "flatted": "^2.0.0",
    "font-awesome": "^4.7.0",
    "handsontable": "^5.0.1",
    "html2canvas": "^1.0.0-alpha.12",
    "jquery": "^3.3.1",
    "json-to-json-transformer": "^1.0.0",
    "jsoneditor": "^5.26.2",
    "jsonpath": "^1.0.0",
    "jspdf": "^1.4.1",
    "lodash": "^4.17.10",
    "nested-property": "0.0.7",
    "ng-block-ui": "^1.0.4",
    "ng-multiselect-dropdown": "^0.2.3",
    "ng-sidebar": "^7.1.0",
    "ng2-bootstrap-modal": "https://github.com/Sky4CE/ng2-bootstrap-modal/tarball/v.1.0.2",
    "ng2-dragula": "^1.5.0",
    "ng2-eonasdan-datetimepicker": "^0.1.3",
    "ng2-file-upload": "^1.3.0",
    "ng2-linq": "^1.0.0",
    "ng2-slim-loading-bar": "^4.0.0",
    "ng2-toastr": "^4.1.2",
    "ngx-accordion": "0.0.17",
    "ngx-bootstrap": "^2.0.3",
    "ngx-clipboard": "^11.1.1",
    "ngx-cookie-service": "^1.0.10",
    "ngx-datetime-picker": "^2.0.0",
    "ngx-filter-pipe": "^2.1.0",
    "ngx-order-pipe": "^2.0.1",
    "ngx-owl-carousel": "^2.0.7",
    "ngx-papaparse": "^2.1.4",
    "ngx-popover": "0.0.16",
    "ngx-select-dropdown": "^0.5.1",
    "ngx-tooltip": "0.0.9",
    "npm": "^5.8.0",
    "object-rename-keys": "^1.2.1",
    "pretty-easy-date-check": "^1.2.4",
    "replaceall": "^0.1.6",
    "rxjs": "^5.5.6",
    "typescript": "2.4.2",
    "xml2js": "^0.4.19",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular/cli": "^1.7.4",
    "@angular/compiler-cli": "^5.2.0",
    "@angular/language-service": "^5.2.0",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/jquery": "^3.3.1",
    "@types/node": "^6.0.111",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "lodash-es": "^4.17.10",
    "protractor": "~5.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1"
  }
}

Я проверил кодировку как все JSON как UTF8, и все они являются действительными JSON. Что не так?

...