When I am going to import htmlToText package I am getting this error
import { htmlToText } from 'html-to-text';
then I got this error
./node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.mjs
Attempted import error: 'Picker' is not exported from 'selderee'.
I was having this same issue. If you have a full stack React app, here's what worked for me.
Send the html from the front end to the backend in the body of an Axios request. Call html-to-text at your API endpoint, then send the response back to the frontend where you'll be using it
In my case, my html-to-text version is 7.0.0
Te solution is to install :
html-to-text ^7.1.1
make a downgrade to 7.1.1 version