Error using html2canvas

I am trying to capture the image of the chessboard.
I will draw the chessboards by reading the FEN strings from the database.
Then I want to capture the image by using html2canvas package (hn-html2canvas). When I try to implement the package in the code, I get the error: Cannot find module ‘punycode’ in ‘public/pages/uuvsr.js’.
Does anyone have any idea?

Same problem. Did you find the solution?

Was anyone able to figure this out?