Closed nipa-it closed 4 years ago
Are you running node v12.14 or later?
I'm getting this same error and I'm using node v12.16.1.
Thanks for building this tool!
Parsing...
Something went wrong, execution halted early.
Error: Invalid character in entity name
Line: 61513
Column: 67
Char: =
at error (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/sax/lib/sax.js:651:10)
at strictFail (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/sax/lib/sax.js:677:7)
at SAXParser.write (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/sax/lib/sax.js:1491:13)
at Parser.exports.Parser.Parser.parseString (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/xml2js/lib/parser.js:323:31)
at Parser.parseString (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/xml2js/lib/parser.js:5:59)
at /Users/jay/code/temp/wordpress-export-to-markdown/node_modules/xml2js/lib/parser.js:338:24
at new Promise (<anonymous>)
at Parser.exports.Parser.Parser.parseStringPromise (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/xml2js/lib/parser.js:336:14)
at Parser.parseStringPromise (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/xml2js/lib/parser.js:5:59)
at Object.exports.parseStringPromise (/Users/jay/code/temp/wordpress-export-to-markdown/node_modules/xml2js/lib/parser.js:378:19)
I can't check now the node.js's version but it's the one I can install with the last Ubuntu 20.04
@jayknyn You have a different error: Invalid character in entity name
.
The stack trace points to xml2js
, which is the third party XML parsing library that my script uses.
Your exported XML may be malformed. I've seen other reports of this happening. You can try running your XML through an online XML parser, see if it passes. Or maybe see if you can spot something that looks funky in your XML on line 61513, column 67.
@nipa-it I have a pretty strong suspicion that's what the problem is. matchAll
wasn't added to node until v12.0.0, which would explain your error.
You got it, it was the version 10.10 of node.js.
Updated everything worked fine.
Any suggestion?
Thank you :)