Skip to content

Error: command does not exist #1154

@hossamelmansy

Description

@hossamelmansy
const program = require("commander");

program.version("0.0.1");
program.description("Webotron deploys websites to AWS");

program
  .command("list-buckets", "List all S3 buckets")
  .action(function() {
    console.log("list-buckets");
  })
  .parse(process.argv);

why this code snippet throws that error, this is the output when running the command:

››› node 01-webotron/webotron.js list-buckets                                                                                      
list-buckets
error: webotron-list-buckets(1) does not exist, try --help

OS: macOS
nodeJS version: v13.6.0
commander: "^4.1.0"

am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions