Closed nvjacobo closed 4 years ago
Looks like it's expecting something in your export file that isn't there. I can't tell what though.
If your export file doesn't contain sensitive data and you're ok with me testing it, I can try it out. You can email me at will at codersblock dot com.
I exported again by the option "all content" and not by" post ". It works
Thanks :)
Oh interesting. Glad you got a workaround, I'll keep this issue open to look into.
I have the same issue. Here’s what I see (from a full export of WordPress).
Could you help, please?
Many Thanks in advance.
Dave.
@daveredfern did you export "all content" from WordPress (not just posts)?
Hi @lonekorean. I tried both and neither worked. I eventually got it to work well when I said no to both image options. Thanks!
Alright, finally had a moment to take a closer look.
@nvjacobo I tried to reproduce the issue with creating an export that only had "posts" vs one that had "all content". Could not reproduce. Looking at the error you got, it shouldn't matter as filter
should be called on something that always exists, no matter the export. I wonder if there is some sort of malformed XML, which I've seen in another issue. I am not sure.
@daveredfern I think your issue is different. Your screenshot shows fs.promises API is experimental
and .matchAll(...) is not a function
which are both hints to me that you were running an older version of node. The experimental promises warning went away in v11.4 and matchAll
was introduced in v12.0. This script requires node v12.14+.
I am closing this issue since it looks like everyone was able to work around it and I'd need more information to do anymore. This is an older issue and I imagine you have moved on with your lives. :)
Hi, node v12.16.1
node index.js
Parsing...
Something went wrong, execution halted early. TypeError: Cannot read property 'filter' of undefined at getItemsOfType (/home/jacobo/wordpress-export-to-markdown/src/parser.js:32:34) at collectPosts (/home/jacobo/wordpress-export-to-markdown/src/parser.js:39:16) at Object.parseFilePromise (/home/jacobo/wordpress-export-to-markdown/src/parser.js:16:16) at async /home/jacobo/wordpress-export-to-markdown/index.js:15:16