question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use flags --name

See original GitHub issue

This is first time i use package commander, and i don’t understand where this problem coming. And how to i use flags --name?

error log:

~/TestNestCommander$ node ./dist/main.js
(node:30) UnhandledPromiseRejectionWarning: Error: option 'name' clashes with existing property 'name' on Command
- call storeOptionsAsProperties(false) to store option values safely,
- or call storeOptionsAsProperties(true) to suppress this check,
- or change option name

Read more on https://git.io/JJc0W
    at Command._checkForOptionNameClash (/home/runner/TestNestCommander/node_modules/commander/index.js:472:13)
    at Command._optionEx (/home/runner/TestNestCommander/node_modules/commander/index.js:499:10)
    at Command.option (/home/runner/TestNestCommander/node_modules/commander/index.js:622:17)
    at CommandRunnerService.setUpCommander (/home/runner/TestNestCommander/node_modules/nest-commander/dist/command-runner.service.js:51:28)
    at CommandRunnerService.onModuleInit (/home/runner/TestNestCommander/node_modules/nest-commander/dist/command-runner.service.js:32:14)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:30) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Example: https://replit.com/@fahri5567/TestNestCommander

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jmcdo29commented, Jun 20, 2021

Looks like this is actually already fixed in commander v7, which I’ll have the next version of nest-commander use under the hood.

0reactions
jmcdo29commented, Jul 5, 2021

Okay, this should be fixed in version 1.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Russia can't use its name and flag at the next 2 Olympics
GENEVA (AP) — Russia will not be able to use its name, flag and anthem at the next two Olympics or at any...
Read more >
panic if flag name begins with - or contains = · Issue #41792
If the flag name is an empty string and is used in the -flag x form, the flag starting with hyphen('-''') can be...
Read more >
ImportError: cannot import name 'Flags' from 'pandas'
Probably, pandas version that you use is old enough. Flags appeared in pandas since 1.2.1 version. In order to get the latest versions...
Read more >
Flag emails in Mail on Mac - Apple Support
In Mail on your Mac, flag emails to make them easier to find later. ... Click the flag name, click it again, then...
Read more >
Russia can't use its name and flag at the next 2 Olympics - PBS
GENEVA (AP) — Russia will not be able to use its name, flag and anthem at the next two Olympics or at any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found