parser icon indicating copy to clipboard operation
parser copied to clipboard

Example in README doesn't work

Open kmannislands opened this issue 5 years ago • 1 comments

The example in the README was confusing since it starts with:

const CLI = require('cli-args');

Which I assume is vestigial.

Moving past that, trying to just C+P the example from the README, it fails with the following:

TypeError: Cannot read property 'context' of undefined

Here's a runkit notebook showing the error.

kmannislands avatar Apr 18 '19 20:04 kmannislands

Also found out after upgrading from the old cli-flags package. Solution worked for me:


CLI.parse(process.argv.slice(2), {})

thvd avatar Mar 04 '21 11:03 thvd