ionic-team / ionic-app-lib

The library used for using ionic apps - consumed by the CLI and the GUI
44 stars 79 forks source link

ionic platform add error caused by CONFIG_FILE (windows host) #136

Open marcionicolau opened 7 years ago

marcionicolau commented 7 years ago

This issue is related with driftyco/ionic-cli#1696 and probably caused by missing slash in CONFIG_FILE.

See below the backtrace:

Unable to parse Ionic Config file. Please make sure it is valid JSON (.ionic/ionic.config) Caught exception: SyntaxError: Unexpected token in JSON at position 0 at Object.parse (native) at Object.load (C:\Users\\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\config.js:14:26 ) at Object. (C:\Users\\AppData\Roaming\npm\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)

Changes in file config.js: CONFIG_FILE: '.ionic/ionic.config' =>CONFIG_FILE: './ionic/ionic.config',