html-to-text / node-html-to-text

Advanced html to text converter
Other
1.61k stars 223 forks source link

Error: Cannot find module 'dom-serializer' #269

Closed neemah closed 1 year ago

neemah commented 1 year ago

Observed output

Error: Cannot find module 'dom-serializer'
Require stack:
- /...../project/node_modules/html-to-text/lib/html-to-text.cjs

Expected output

No errors about dom-serializer

Version information

I did not find dom-serializer in package.json of html-to-text package, it seems this is the reason behind error. Added this librabry to our project solved and issue.

KillyMXI commented 1 year ago

Hmm. Weird that you got the error. The dependency chain is html-to-text -> htmlparser2 -> domutils -> dom-serializer So it must be present in node_modules.

But anyway, good point, looks like I've added it explicitly in html-to-md/package.json and forgot in html-to-text/package.json

Thanks

KillyMXI commented 1 year ago

Published version 9.0.3 with the fix.