visual studio在package.json中显示错误

问题描述 投票:-3回答:1

{“name”:“com.example.dashbordapp”,“displayName”:“DashbordApp”,“version”:“1.0.0”,“description”:“响应deviceready事件的示例Apache Cordova应用程序。”, “main”:“index.js”,“author”:“Apache Cordova Team”,“license”:“Apache-2.0”,“scripts”:{“ng”:“ng”,“start”:“ng serve” “,”build“:”ng build“,”test“:”ng test“,”lint“:”ng lint“,”e2e“:”ng e2e“}},”private“:true,”dependencies“: {“@ angular / animations”:“^ 5.0.3”,“@ angular / cdk”:“^ 5.0.3”,“@ angular / common”:“^ 5.0.3”,“@ angular / compiler”: “^ 5.0.3”,“@ angular / core”:“^ 5.0.3”,“@ angular / forms”:“^ 5.0.3”,“@ angular / http”:“^ 5.0.3”,“ @ angular / material“:”^ 5.0.3“,”@ angular / platform-b​​rowser“:”^ 5.0.3“,”@ angular / platform-b​​rowser-dynamic“:”^ 5.0.3“,”@ angular / router“:”^ 5.0.3“,”admin-lte“:”^ 2.4.2“,”angular-datatables“:”^ 4.2.0“,”angular-froala-wysiwyg“:”^ 2.7.3 “,”angular-webstorage-service“:”^ 1.0.2“,”angular4-material-table“:”^ 0.1.8“,”bootstrap“:”^ 3.3.7“,”bootstrap3-wysihtml5-npm“ :“^ 0.3.3-npm.12 “,”core-js“:”^ 2.4.1“,”datatables.net“:”^ 1.10.11“,”datatables.net-dt“:”^ 1.10.11“,”ionicons“:”^ 3.0 .0“,”jquery“:”^ 3.3.1“,”jquery-slimscroll“:”^ 1.3.8“,”ng2-toastr“:”^ 4.1.2“,”ngx-adminlte“:”^ 0.9 .3“,”ngx-ckeditor“:”^ 0.2.0“,”rxjs“:”^ 5.5.2“,”zone.js“:”^ 0.8.14“},

angular visual-studio
1个回答
0
投票

在json文件中,您不应该像在javascript或typescript中那样添加额外的尾随逗号。下面是更正的json值

 {
      "name": "com.example.dashbordapp",
      "displayName": "DashbordApp",
      "version": "1.0.0",
      "description": "A sample Apache Cordova application that responds to the deviceready event.",
      "main": "index.js",
      "author": "Apache Cordova Team",
      "license": "Apache-2.0",
      "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e"
      },
    "private": true,
    "dependencies": {
      "@angular/animations": "^5.0.3",
      "@angular/cdk": "^5.0.3",
      "@angular/common": "^5.0.3",
      "@angular/compiler": "^5.0.3",
      "@angular/core": "^5.0.3",
      "@angular/forms": "^5.0.3",
      "@angular/http": "^5.0.3",
      "@angular/material": "^5.0.3",
      "@angular/platform-browser": "^5.0.3",
      "@angular/platform-browser-dynamic": "^5.0.3",
      "@angular/router": "^5.0.3",
      "admin-lte": "^2.4.2",
      "angular-datatables": "^4.2.0",
      "angular-froala-wysiwyg": "^2.7.3",
      "angular-webstorage-service": "^1.0.2",
      "angular4-material-table": "^0.1.8",
      "bootstrap": "^3.3.7",
      "bootstrap3-wysihtml5-npm": "^0.3.3-npm.12",
      "core-js": "^2.4.1",
      "datatables.net": "^1.10.11",
      "datatables.net-dt": "^1.10.11",
      "ionicons": "^3.0.0",
      "jquery": "^3.3.1",
      "jquery-slimscroll": "^1.3.8",
      "ng2-toastr": "^4.1.2",
      "ngx-adminlte": "^0.9.3",
      "ngx-ckeditor": "^0.2.0",
      "rxjs": "^5.5.2",
      "zone.js": "^0.8.14"
    }
    }
© www.soinside.com 2019 - 2024. All rights reserved.