yo icon indicating copy to clipboard operation
yo copied to clipboard

`yo` depends on deprecated `module.parent`, should update `meow`

Open loynoir opened this issue 2 years ago • 2 comments
trafficstars

Type of issue


My environment

  • OS version/details: eg. Windows 10 64-bit
  • Node version: x.x.x (run node --version in your terminal)
  • npm version: x.x.x (run npm --version in your terminal)
  • Version of yo : x.x.x (run yo --version in your terminal) 4.3.1

Expected behavior

Should update meow to a version don't use module.parent.

Current behavior

[email protected] depends on [email protected] https://github.com/yeoman/yo/blob/v4.3.1/package.json#L59

[email protected] depends on module.parent.filename https://github.com/sindresorhus/meow/blob/v5.0.0/index.js#L15

module.parent Deprecated since: v14.6.0, v12.19.0

https://nodejs.org/api/modules.html#moduleparent

Steps to reproduce the behavior

Command line output

Paste your error output over here

Related

https://github.com/denoland/deno/issues/19105

loynoir avatar May 12 '23 10:05 loynoir

I am getting this error, when running deno -A npm:yo webapp:

 Uncaught TypeError: chalk.red.bold is not a function

The above error occurs because of having multiple chalk versions I guess. yo internally uses v5.x, while there's an indirect dependency to chalk v1.x.

Not sure if this is a deno issue or a yeoman issue. I checked that yeoman closed the root-check upgrade PR: https://github.com/yeoman/yo/pull/699 So starting a discussion here instead.

phoenisx avatar Sep 04 '24 03:09 phoenisx

npmlog also deprecated

npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.

Thaina avatar Sep 18 '24 04:09 Thaina

I am getting this error, when running deno -A npm:yo webapp:

 Uncaught TypeError: chalk.red.bold is not a function

The above error occurs because of having multiple chalk versions I guess. yo internally uses v5.x, while there's an indirect dependency to chalk v1.x.

Not sure if this is a deno issue or a yeoman issue.

That's a deno issue. Yeoman works fine on there now though: https://github.com/denoland/deno/issues/19105#issuecomment-2521878460

👍 on upgrading meow to as new a version as possible. We can't go to the newest 13.x because it's been ESM only for a few major versions now: https://github.com/sindresorhus/meow/issues/204. #787 tracks onboarding to ESM. For this issue, let's bump meow to the latest version that still supports CJS.

JoshuaKGoldberg avatar Jan 23 '25 22:01 JoshuaKGoldberg

Fixed in https://github.com/yeoman/yo/pull/862

mshima avatar Apr 10 '25 11:04 mshima

You are on fire @mshima 🔥 👏

JoshuaKGoldberg avatar Apr 10 '25 11:04 JoshuaKGoldberg