command-line-usage: Deno runtime not supported
Due to https://github.com/denoland/deno/issues/13321, the library fails with
error: Uncaught TypeError: chalk.underline.bold is not a function
at ContentSection.header (file:///Users/ulken/Library/Caches/deno/npm/registry.npmjs.org/command-line-usage/6.1.3/lib/section.js:23:32)
The version of chalk
used is really old. Please consider upgrading to at least 4.X, where the issue above is fixed. If you want to take the step to ESM, you might want to take it to 5.X+ even.
If you’re up for it, let me know if you want me to help out in any way.
PS. Even if you have no intention of supporting Deno, I think it would still be worth to upgrade Chalk to a more modern (and safer) version.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (9 by maintainers)
Commits related to this issue
- Upgrade chalk to version v5 to enable support for Deno #40 — committed to 75lb/command-line-usage by 75lb a year ago
Hey, look at that!
For unknown reason, the formatting is not displayed in Warp, but that is on them (works in Hyper and Terminal.app)…
https://app.warp.dev/block/nvpi0MT2iXS45OmFaVQyjT
Is it erroneously thinking it’s piped and strips the formatting? Idk. Don’t bother.
mkdir cli-usage-deno && cd $_
deno init
main.ts
withdeno run --allow-read --allow-env main.ts
(could also pass--allow-all
if you prefer)Let me know if you get stuck on something.