Ionic-cli: can not using ionic cli

Created on 25 Nov 2016  路  6Comments  路  Source: ionic-team/ionic-cli

can not using ionic cli
node v v6.9.1
cordova v 6.4.0


ionic info
Unable to parse Ionic Config file. Please make sure it is valid JSON (.ionic/ionic.config)
Caught exception:
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at Object.load (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/config.js:14:26)
at Object. (/usr/local/lib/node_modules/ionic/lib/utils/stats.js:31:31)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

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

All 6 comments

I have the same problem

I resolved this issue.
Remove .ionic directory and then re-install ionic with npm again.

Thank you! You saved my life!
I have a university job to present and I'm using Ionic.

Hi,

I still have the same issue even if I re-install ionic with npm again.

Even if I use "$ ionic info", i get this response:

Unable to parse Ionic Config file. Please make sure it is valid JSON (.ionic/ionic.config)
Caught exception:
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at Object.load (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/config.js:14:26)
at Object. (/usr/local/lib/node_modules/ionic/lib/utils/stats.js:31:31)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

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

Please help guys, thanks!

I've have the same issue, but I solved it ! 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.

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

Closed as this is the legacy CLI. If this is still an issue with the latest version, please make a new issue.

Was this page helpful?
0 / 5 - 0 ratings