ionic-cli
ionic-cli copied to clipboard
Ionic Package: Unexpected end of JSON input
When uploading my app to Ionic Package to be compiled an error will be thrown, but the build will succeed. This issue affects iOS and Android builds.
$ ionic package build ios --profile prod --release --noresources
Caught exception:
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at /PATH_TO_MY_IONIC_APP/node_modules/ionic/node_modules/ionic-app-lib/lib/io-config.js:169:24
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Caught exception:
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at /PATH_TO_MY_IONIC_APP/node_modules/ionic/node_modules/ionic-app-lib/lib/io-config.js:169:24
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Uploading your project to Ionic...
Submitting your app to Ionic Package...
Your app has been successfully submitted to Ionic Package!
Build ID: 30
We are now packaging your app.
# Some time later
$ ionic package download
Downloading... [=============================] 100% 0.0s
Wrote: /PATH_TO_MY_IONIC_APP/MY_IONIC_APP.ipa
Done!
My system information:
$ ionic info
Your system information:
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.5.0
Xcode version: Xcode 8.0 Build version 8A218a
i'm facing the same problem。 platform/android.json have none input
Under your project root, check .io-config.json if should have something like: {"app_id":"xxxxxxxx"} if the file is empty, add {"app_id":"xxxxxxxx"} to it and replace the xxxxxx with the app id from ionic.config.json.
Closed as this is the legacy CLI. If this is still an issue with the latest version, please make a new issue.