Reputation: 3294
I am trying to execute ionic command.
ionic cordova platform add ios
it gives me following error on terminal.
Error: Invalid attribute name
Line: 12
Column: 35
Char: "
at error (/Users/jacmacos2/Desktop/project/node_modules/sax/lib/sax.js:666:10)
at strictFail (/Users/jacmacos2/Desktop/project/node_modules/sax/lib/sax.js:692:7)
at Object.write (/Users/jacmacos2/Desktop/project/node_modules/sax/lib/sax.js:1330:13)
at XMLParser.feed (/Users/jacmacos2/Desktop/project/node_modules/elementtree/lib/parsers/sax.js:48:15)
at ElementTree.parse (/Users/jacmacos2/Desktop/project/node_modules/elementtree/lib/elementtree.js:271:10)
at Object.parse (/Users/jacmacos2/Desktop/project/node_modules/elementtree/lib/elementtree.js:584:8)
at Function.<anonymous> (/Users/jacmacos2/Desktop/project/node_modules/ionic/node_modules/@ionic/cli-utils/lib/cordova/config.js:29:28)
at next (native)
project
I don't understand what is happen. If anyone faced this issue please tell me how to solve it. Thanks in advance.
Upvotes: 2
Views: 4806
Reputation: 31
In my case I had copied an excerpt from a web page and there was a different character instead of spaces.
I search and replaced this alternative space character and then it passed.
This is why in my case the line with the error read:
Error: Invalid attribute name
Line: 12
Column: 35
Char:
Upvotes: 1
Reputation: 1
In my case it was an unnecessary comma (,). So basically go through your code to check for any typos.
Upvotes: 0
Reputation: 1
On my case, there is a &
symbol on name
property of config.xml
. Took me a while before I figure it out.
Upvotes: 0
Reputation: 3294
I solved it. I check my config.xml file. The double quote was removed from there. I just add it and complete it then issue solved.
Upvotes: 4