I got this error while doing
ionic prepare android and ionic prepare ios.
I'm trying to remove platform from the project to re-add it, but this showing the same error "Non-whitespace before first tag".
Have you any idea of how I can solve this?
I'm using ionic 1.2 and cordova 6.5.0.
Error: Non-whitespace before first tag. Line: 0 Column: 1 Char: 9 at error (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:667:10) at strictFail (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:693:7) at beginWhiteSpace (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:967:7) at SAXParser.write (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:1022:11) at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:503:31) at Parser.parseString (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:7:59) at Object.exports.parseString (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:535:19) at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/config-xml.js:21:12 at tryToString (fs.js:447:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:434:12)
The issue for me was when i lost power on my pc as i was building the app for android, i tried everything nothing worked until i checked my config.xml where i found it was in gibish i couldnt read anything from it. luckly i had a git backup so i restored my config.xml file and all was good again.
> cordova.cmd build android Non-whitespace before first tag. Line: 0 Column: 1 Char:
ionic cordova platform rm android
ionic cordova platform add android@latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With