DEV Community

Sébastien Vassaux
Sébastien Vassaux

Posted on

nestjs command by name not working

Hello!

I have built commands with nestjs and declared them like this

@Command({
  name: 'lemlist-campaign-update',
  options: { isDefault: false },
})
Enter fullscreen mode Exit fullscreen mode

And in my package.json

  "scripts": {
    "cmd": "nest build commands && nest start commands",
}
Enter fullscreen mode Exit fullscreen mode

When I run yarn cmd command_name nothing happens
When I set a default true on one command and I run yarn cmd this default command is run

How can I run a specific command without having to change the default option?

Thanks a lot :)

Top comments (0)