Closed tarihala closed 3 months ago
Using: wordpress-export-tomarkdown 2.3.7 macOS Sonoma 14.5 node 22.2.0 npm 10.7.0
Hi @tarihala, thanks for bringing this to my attention and digging into it!
That scary looking deprecation warning is a downstream result of me using this deprecated package. I knew that one day it would cause a problem. Looks like today is that day. 😄
I ripped it out and replaced it with a different package and updated some code. If you have time, can try running it again with this branch?
Should be able to just:
git fetch
git checkout deprecation-fix
npm install
Then run as before.
I'll merge and release a new version soon, but would make me feel better to know it runs smoothly on your computer.
@lonekorean that was fast!
Looks great! That branch works fine on my computer and with my export.xml
file. Nice work! 🎸
Awesome, fix released in v2.4.0. Closing this out, thank you!
Issue Looks like the
punycode
module, used in the dependenciespsl
andtough-cookie
are deprecated, causing the wizard and package to fail.Recreate
$ npx wordpress-to-markdown
produces error:Investigation
$ npm install wordpress-to-markdown
--trace-deprecation
flag$ npm run trace
shows me there is an issue withpsl
package, and when I fix, also withtough-cookie
package.Temporary fix to get to run Add a trailing forward to slash to two files;
./node_modules/psl/index.js
Change line 5, from:var Punycode = require('punycode');
tovar Punycode = require('punycode/');
./node_modules/tough-cookie/lib/cookie.js
Change line 43, from:punycode = require('punycode');
topunycode = require('punycode/');
Following these changes, the package works.
Thoughts Looks like both
psl
andtough-cookie
packages need updating, patches need to be made, or alternative dependencies are required. Until then, these temporary fixes got it working for me.P.S. Thanks @lonekorean for sharing your work!