My PC recently crashed while halfway through building my Ionic 2 project, and now I can’t run any ionic commands. When I try to run any ionic command in any of my ionic projects I get the following command output:
SyntaxError: Unexpected token in JSON at position 0 at Object.parse (native) at Object.load (C:\Users\iyash\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\config.js:13:24) at Object.<anonymous> (C:\Users\iyash\AppData\Roaming\npm\node_modules\ionic\lib\utils\stats.js:31:31) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19)
I’ve tried removing all the node_modules in my project and reinstalling them as well as uninstalling and reinstalling both cordova and ionic. I’ve also cleared the contents of my www folder. I’ve removed and re-added my platforms using cordova commands, since ionic doesn’t work.
I can’t run ionic info to get my version info.
Any suggestion on what else I can do to get ionic working again?