错误:根节点外的文本数据

时间:2017-11-15 13:34:48

标签: xml cordova ionic-framework ionic3 node-modules

运行ionic cordova platform add iosionic cordova plaform remove ios

时出现以下错误

我已经安装了最新版本的离子cordova。但是,我不知道最近会发生什么。这是完整的错误:

Error: Text data outside of root node.
Line: 157
Column: 11
Char: Z
    at error (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:666:10)
    at strictFail (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:692:7)
    at SAXParser.write (/usr/local/lib/node_modules/ionic/node_modules/sax/lib/sax.js:1035:15)
    at XMLParser.feed (/usr/local/lib/node_modules/ionic/node_modules/elementtree/lib/parsers/sax.js:48:15)
    at ElementTree.parse (/usr/local/lib/node_modules/ionic/node_modules/elementtree/lib/elementtree.js:271:10)
    at Object.parse (/usr/local/lib/node_modules/ionic/node_modules/elementtree/lib/elementtree.js:584:8)
    at Function.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/cordova/config.js:35:28)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:100:62)
    at <anonymous>

1 个答案:

答案 0 :(得分:4)

这可能是由于你的config.xml文件中有一个拼写错误,它不是很好的形成xml。