brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 285 forks source link

ERROR: ReferenceError: Can't find variable: Map #246

Open pdme opened 5 years ago

pdme commented 5 years ago

I get this error when trying to access a certain url.

Apparently, I have to include a polyfill since PhantomJS doesn't support ES6 Map (https://stackoverflow.com/questions/41729482/phantomjs-cant-find-variable-map).

Simply requiring a polyfill in the node process doesn't do the trick however, e.g. require(@babel/polyfill)

Any ideas?