Says HTMLCanvasElement is not defined, I am trying to use JSDOM with this.
@theonlygusti
Facing the same issue here. I'm trying to include dom-to-image in the gulp task that compiles my template (handlebars/panini).
I'm also using jsdom (gulp-dom) and getting the same error. I guess that since there is no window there is also no HTMLCanvasElement.
Is there an easy way to make this work also server side?
Same issue. How do you make this work server-side...
same issue
Me too facing this issue
https://github.com/tmpvar/jsdom/wiki/Don't-stuff-jsdom-globals-onto-the-Node-global
JSDOM have been clearer on Canvas Support:
https://github.com/jsdom/jsdom#canvas-support
Does this resolve the original issue and dom-to-image will work in jsdom?
Any progress so far?
Same issue, says "ReferenceError: SVGRectElement is not defined".
@theonlygusti I want to ask you whether solve this problem yet?
说
HTMLCanvasElement未定义,我正在尝试与此一起使用JSDOM。
这个问题解决了吗
@theonlygusti 这个问题解决了吗
有人可以使用在node中了吗
It seems that dom-to-image has to work within a browser, see this issue #34
Does anyone has managed to make this running server side?
Can take a look at this answer on stackoverflow.
Instead of using JSdom and dom-to-image, you can make use of puppeteer which is a headless chrome nodejs API.
Most helpful comment
Same issue. How do you make this work server-side...