lovell / avif-cli

Command line utility to convert images to AVIF
Apache License 2.0
165 stars 18 forks source link

"npx avif ..." Broken in node < 12.19 (maybe other versions too) #1

Closed Beamanator closed 3 years ago

Beamanator commented 3 years ago

FYI, I got an error from require("fs/promises") - mentioned in this stack-overflow question when trying to run npx avif with node version 12.13.1

Looks like you may need node > 12.19

Feel free to close this issue if you want, I am just mentioning it b/c you said "requires Node.js 10+" in the Readme :)

lovell commented 3 years ago

Thanks for reporting, we should be able to fix this with the following patch. Happy to accept a PR if you're able.

- const fs = require("fs/promises");
+ const fs = require("fs").promises;
Beamanator commented 3 years ago

@lovell No problem :) Done 👍

lovell commented 3 years ago

Thanks for the PR, published as v0.0.2