Currently experimenting with utilizing node-html-to-image
within Deno:
import nodeHtmlToImage from "npm:node-html-to-image";
nodeHtmlToImage({
output: './image.png',
html: '<html><body>Hello world!</body></html>'
})
.then(() => console.log('Image successfully created!'))
When running
deno run --allow-env --allow-read --allow-write that-file.ts
, I encounter this error:
error: Uncaught Error: Unable to launch browser, error message: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (982053).
at Cluster.<anonymous> (file:///Users/theonlygusti/Library/Caches/deno/npm/registry.npmjs.org/puppeteer-cluster/0.23.0/dist/Cluster.js:119:23)
at Generator.throw (<anonymous>)
at rejected (file:///Users/theonlygusti/Library/Caches/deno/npm/registry.npmjs.org/puppeteer-cluster/0.23.0/dist/Cluster.js:6:65)
Any suggestions on how to make use of the node-html-to-image
npm package with Deno?