编辑我的Ionic配置永远打破配置

时间:2017-12-29 14:53:03

标签: json ionic-framework ionic2

所以,我试图在Ionic中更新我的代理以解决任何CORS问题。奇怪的问题是,每当我更新我的Ionic配置时,它都会在之后永远被破坏。这是从新的Ionic Start命令生成的内容

{
 "name": "vsts",
 "app_id": "",
 "type": "ionic-angular",
 "integrations": {}
}

使用此设置运行Ionic Serve不会导致初始问题。那么我的下一步是添加代理

{
 "name": "vsts",
  "app_id": "",
  "type": "ionic-angular",
  "integrations": {},
  "proxies": [
  {
     "path": "/api",
     "proxyUrl": "http://cors.api.com/api"
  }
 ]
}

然后导致

[ERROR] The config file (.\ionic.config.json) is not valid JSON format.


    Please fix any JSON errors in the file.

我通过JSONLint运行了这个,我的眼睛不会欺骗我,这是有效的JSON。我的下一步想法是将其恢复为原始JSON,但每次后续尝试运行Ionic Serve都会导致它告诉我JSON无效。我不知所措。

0 个答案:

没有答案