chalk/supports-color

Breaks on Cloudflare Workers #159

hugo082 posted onGitHub

Accessing process.argv on Clouflare Workers ends up with an undefined value.

Can we make sure to deal with it and securise the access to it? So the code will not break on Cloudflare Workers.

Currently, it fails with TypeError: Cannot read properties of undefined (reading 'indexOf')


This is a Node.js package, so process.argv is expected to exist.

https://developers.cloudflare.com/workers/runtime-apis/nodejs/

posted by sindresorhus 3 months ago

Fund this Issue

$0.00
Funded

Pull requests