无法解析Ionic Config文件。请确保它是有效的JSON [英] Unable to parse Ionic Config file. Please make sure it is valid JSON

查看:444
本文介绍了无法解析Ionic Config文件。请确保它是有效的JSON的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然之间,我在尝试运行离子时得到了这个。怎么了?

All of a sudden, I'm getting this while trying to run ionic. What's wrong?

C:\Users>ionic
Unable to parse Ionic Config file. Please make sure it is valid JSON (.ionic/ionic.config)

Caught exception:
 SyntaxError: Unexpected token
    at Object.parse (native)
    at Object.module.exports.load (C:\Users\BBytes\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\config.js:14:26)
    at Object.<anonymous> (C:\Users\BBytes\AppData\Roaming\npm\node_modules\ionic\lib\utils\stats.js:31:31)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Users\BBytes\AppData\Roaming\npm\node_modules\ionic\lib\cli.js:3:18)

Mind letting us know? https://github.com/driftyco/ionic-cli/issues


推荐答案

我找到了问题的根源!当我的电脑崩溃/或由于其他一些错误时,我的 C:/ Users / {username} / .ionic / ionic.config 文件已损坏。

I've found the source of the problem! My C:/Users/{username}/.ionic/ionic.config file was corrupted when my pc crashed /or due to some other error.

奇怪的是,在卸载离子时,该文件永远不会被清除。

Weird that that file NEVER gets cleared when uninstalling ionic.

只需删除文件,当你运行 ionic发送它默认会在文件夹中创建文件。

Just Delete the file and when you run ionic serve it will create the file by default in the folder.

这篇关于无法解析Ionic Config文件。请确保它是有效的JSON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆