ecomfe / fontmin

Minify font seamlessly
http://ecomfe.github.io/fontmin
MIT License
5.62k stars 311 forks source link

ERR_REQUIRE_ESM occurs when just invoke `fontmin` #111

Closed aztack closed 2 weeks ago

aztack commented 7 months ago

Error occurs when just invoke fontmin: Node 16.15.1

/Users/username/.config/yarn/global/node_modules/fontmin/cli.js:13
var meow = require('meow');
           ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/.config/yarn/global/node_modules/fontmin/node_modules/meow/index.js from /Users/username/.config/yarn/global/node_modules/fontmin/cli.js not supported.
Instead change the require of index.js in /Users/username/.config/yarn/global/node_modules/fontmin/cli.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/username/.config/yarn/global/node_modules/fontmin/cli.js:13:12) {
  code: 'ERR_REQUIRE_ESM'
}
qiutian00 commented 1 month ago

also come this problem

kekee000 commented 3 weeks ago

fixed in fontmin@1.1.0