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.

Unrecognized CLI options with Serverless 3

See original GitHub issue

This is a bug report

Expected behavior

Passing CLI options for this plugin (e.g. --no-confirm) should work with Serverless 3.

Actual behavior

Deploy fails with the error:

Detected unrecognized CLI options: "--confirm".

Steps to reproduce

  • Operating system: Windows 11
  • serverless-finch version: 2.6.0
  • serverless.yml that produces bug: any
  • Command that produces bug: serverless deploy --no-confirm
  • Other details:

I believe this is because Serverless 3 throws an error for any unrecognized options, and this plugin doesn’t define the options as documented in the Serverless plugins guide.

I tested defining the option like this and it seemed to resolve the issue:

    this.commands = {
      client: {
        usage: 'Generate and deploy clients',
        lifecycleEvents: ['client', 'deploy'],
        commands: {
          deploy: {
            usage: 'Deploy serverless client code',
            lifecycleEvents: ['deploy'],
            options: {
              confirm: {
                usage: 'Display a confirmation prompt',
                type: 'boolean'
              }
            }
          },

I can create a pull request but I’m not aware of all the possible command options, and I’m also not sure whether you’d prefer to move the command definitions to a new file, since it will probably get quite a bit longer if every option is defined here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
mikejpeterscommented, Feb 4, 2022

I’ve created a pull request, but for anyone who would like to use this plugin with Serverless 3 in the meantime, I’ve published my fork to NPM at @boundstate/serverless-finch.

0reactions
fernando-mccommented, Feb 20, 2022

@mikejpeters appreciate the fix! Would you be interested in helping with #142 and merging your fix in here? Unfortunately I am no longer able to maintain this plugin and am looking to find folks who can help maintain the plugin long term.

Read more comments on GitHub >

github_iconTop Results From Across the Web

opt:some_var Detected unrecognized CLI options · Issue #9371
Hello @Wurstnase - support for custom CLI options is going to be deprecated in 3.0.0 and we recommend using e.g. environment variables in ......
Read more >
Serverless Framework Deprecations
Handling of unrecognized CLI options. Deprecation code: UNSUPPORTED_CLI_OPTIONS. CLI options validation was introduced to detect typos and mistakes.
Read more >
Detected unrecognized CLI options: "--profile" - Stack Overflow
I am trying to deploy my code to AWS using Serverless through Gitlab cicd. All stages have been passed but when ...
Read more >
detected unrecognized cli options serverless - You.com
I believe this is because Serverless 3 throws an error for any unrecognized options, and this plugin doesn't define the options as documented...
Read more >
serverless-offline/community - Gitter
Hey peep, any one having issues with serverless offline that it just hangs at ... I'm getting hit with Detected unrecognized CLI options:...
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