我正在更新旧的Ionic 1项目,该项目实际上已经在2个月前开始工作。
运行ionic cordova prepare ios
后出现的错误是:
Error: Unencoded <
Line: 1
Column: 2
Char: <
at error (/Users/nikola/DEV/myFirstIonicProject/node_modules/elementtree/node_modules/sax/lib/sax.js:666:10)
at strictFail (/Users/nikola/DEV/myFirstIonicProject/node_modules/elementtree/node_modules/sax/lib/sax.js:692:7)
at SAXParser.write (/Users/nikola/DEV/myFirstIonicProject/node_modules/elementtree/node_modules/sax/lib/sax.js:1080:13)
at XMLParser.feed (/Users/nikola/DEV/myFirstIonicProject/node_modules/elementtree/lib/parsers/sax.js:48:15)
at ElementTree.parse (/Users/nikola/DEV/myFirstIonicProject/node_modules/elementtree/lib/elementtree.js:271:10)
at Object.parse (/Users/nikola/DEV/myFirstIonicProject/node_modules/elementtree/lib/elementtree.js:584:8)
at Function.<anonymous> (/Users/nikola/DEV/myFirstIonicProject/node_modules/ionic/node_modules/@ionic/cli-utils/lib/cordova/config.js:35:28)
at Generator.next (<anonymous>)
at fulfilled (/Users/nikola/DEV/myFirstIonicProject/node_modules/ionic/node_modules/tslib/tslib.js:104:62)
at <anonymous>
有什么想法或提示吗?
答案 0 :(得分:1)
这是“离子1时刻”中的一种,其解决方法不在错误消息中,而是仔细查看config.xml
文件并确保其中没有多余的字符。
就我而言,文件末尾有多余的一行。我不确定为什么这会导致构建失败。
无论哪种方式,希望对您有所帮助。 https://en.wikipedia.org/wiki/List_of_HTTP_status_codes官方线程对于查明此“错误”也很有用。