Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"TypeError: next.match is not a function" with "number" values #166

Closed
juergba opened this issue Mar 26, 2019 · 0 comments · Fixed by #167
Closed

"TypeError: next.match is not a function" with "number" values #166

juergba opened this issue Mar 26, 2019 · 0 comments · Fixed by #167

Comments

@juergba
Copy link
Contributor

juergba commented Mar 26, 2019

const parse = require('yargs-parser');

args = parse( ['--p', 2] );

Results in:

TypeError: next.match is not a function
    at parse (D:\yargs-parser\node_modules\yargs-parser\index.js:193:42)
    at Parser (D:\yargs-parser\node_modules\yargs-parser\index.js:901:16)

The opposite - converting number into string works fine:

args = parse( ['--p', '2'] );         // { _: [], p: 2 }
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant