Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Example in README doesn't work #48

Open
kmannislands opened this issue Apr 18, 2019 · 1 comment
Open

Example in README doesn't work #48

kmannislands opened this issue Apr 18, 2019 · 1 comment

Comments

@kmannislands
Copy link

kmannislands commented Apr 18, 2019

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.

@thvd
Copy link

thvd commented Mar 4, 2021

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants