Project no longer maintained
squoosh-cliをメンテナンスしているグループが昨今の経済事情によりsquoosh-cliのメンテナンスを辞めるみたいです。詳しくは以下を参照。
Windows 10での例でいえば、
ダメな例:
squoosh-cli --mozjpeg '{quality:90}' -d output-dir 画像.jpg
squoosh-cli --mozjpeg "'{quality:90}'" -d output-dir 画像.jpg
OKな例:
squoosh-cli --mozjpeg {quality:90} -d output-dir 画像.jpg
squoosh-cli --mozjpeg {"quality":90} -d output-dir 画像.jpg
理由は深く突き止めるのが面倒だったのであれですが、だめなやり方で行うと途中でエラーを吐き出しながら永遠に止まってしまう。しかも、エラーの説明も途中で終わってしまっている。
0/1 / ▐▨▨▨▨▨╌╌╌╌╌▌ Encoding (8 threads) 画像.jpg: 227.06KB(node:14904) UnhandledPromiseRejectionWarning: Cannot use 'in' operator to search for 'quality' in {quality:90} (Use `node --trace-warnings ...` to show where the warning was created) (node:14904) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:14904) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not h 0/1 / ▐▨▨▨▨▨╌╌╌╌╌▌ Encoding (8 threads) 画像.jpg: 227.06KB
コメント