sindresorhus / meow

🐈 CLI app helper
MIT License
3.54k stars 151 forks source link

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module #202

Closed hm496 closed 3 years ago

hm496 commented 3 years ago

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/home/.n/lib/node_modules/fontmin/node_modules/meow/index.js require() of ES modules is not supported. require() of /Users/home/.n/lib/node_modules/fontmin/node_modules/meow/index.js from /Users/home/.n/lib/node_modules/fontmin/cli.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/home/.n/lib/node_modules/fontmin/node_modules/meow/package.json.

sindresorhus commented 3 years ago

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

sergeymorkovkin commented 1 year ago

Maybe it's time update README?