TypeError: node.childNodes[i].getAttribute is not a function
Closed this issue · 2 comments
I tried running this and i'm getting the following error:
Something went wrong, execution halted early.
TypeError: node.childNodes[i].getAttribute is not a function
at Object.replacement (/Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.cjs.js:61:30)
at TurndownService.replacementForNode (/Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:877:10)
at /Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:836:40
at NodeList.reduce (<anonymous>)
at TurndownService.process (/Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:829:17)
at TurndownService.replacementForNode (/Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:872:25)
at /Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:836:40
at NodeList.reduce (<anonymous>)
at TurndownService.process (/Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:829:17)
at TurndownService.replacementForNode (/Users/achristianson/Downloads/wordpress-export-to-markdown/node_modules/turndown/lib/turndown.cjs.js:872:25)
I'm running node version 14.15.1, though I also did try using 12.21.0. I also double checked the versions of turndown and turndown-plugin-gfm. I check on those projects and don't see any issues related to these errors.
Thoughts?
Hm, hard to debug without seeing what markup it's tripping on. Would you be willing to send your XML file to me? If it doesn't have any private/sensitive info in it. If not, I totally understand!
@lonekorean unfortunately the wordpress data I've converting is for an internal corporate Intranet. I was able to find a forked version from a different repo that worked for me, https://github.com/swizec/wordpress-to-markdown. Thanks for your reply.