.angular-cli.json'failed.Ensure文件是有效的JSON。位于> JSON位置的错误:意外的令牌]

时间:2017-12-21 12:53:15

标签: angular npm-install ng-file-upload

我为我的项目安装此npm install ng-file-upload ng-file-upload现在我的项目出现了一些错误,

  

d:\网络\ ng4fbbootstrap \ node_modules \ @angular \ CLI \模型\配置\ config.js:89               抛出新的InvalidConfigError(common_tags_1.stripIndent`               ^

     

InvalidConfigError:解析'D:\ web \ ng4fbbootstrap.angular-cli.json'   失败。确保该文件是有效的JSON。错误:意外的令牌]   JSON在515位       在Function.fromConfigPath(D:\ web \ ng4fbbootstrap \ node_modules \ @angular \ cli \ models \ config \ config.js:89:19)       在Function.fromProject(D:\ web \ ng4fbbootstrap \ node_modules \ @angular \ cli \ models \ config.js:67:46)       在对象。 (d:\网络\ ng4fbbootstrap \ node_modules \ @angular \ CLI \命令\ build.js:10:3​​5)       在Module._compile(module.js:612:30)       at Object.Module._extensions..js(module.js:623:10)       在Module.load(module.js:531:32)       在tryModuleLoad(module.js:494:12)       在Function.Module._load(module.js:486:3)       在Module.require(module.js:556:17)       at require(internal / module.js:11:18)

package.jason

{
  "name": "ng4fbbootstrap",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.8",
    "@types/core-js": "^0.9.43",
    "@types/fullcalendar": "^3.5.1",
    "angular-bootstrap-calendar": "^0.30.0",
    "angular-calendar": "^0.22.1",
    "angular-font-awesome": "^3.0.3",
    "angular-weekly-scheduler": "0.0.5",
    "ap-angular2-fullcalendar": "^1.3.6",
    "bootstrap": "^4.0.0-beta.2",
    "core-js": "^2.4.1",
    "font-awesome": "^4.7.0",
    "fullcalendar": "^3.6.2",
    "fullcalendar-ag4": "^0.1.3",
    "jquery": "^3.2.1",
    "moment": "^2.20.1",
    "ng-file-upload": "^12.2.13",
    "ng-fullcalendar": "^1.2.0",
    "rxjs": "^5.5.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.6.1",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2",
    "typings": "^2.1.1"
  }
}

如何解决这个问题? 请帮帮我

1 个答案:

答案 0 :(得分:0)

我解决了我的问题 再次安装Angular

npm install -g @angular/cli 现在它的工作对我来说