Serverless-offline: --noPrependStageInUrl option broken with serverless 2.32.0

Created on 31 Mar 2021  路  8Comments  路  Source: dherault/serverless-offline

Bug Report

Current Behavior

Running the command serverless offline --noPrependStageInUrl with serverless 2.32.2 (the latest version) results in an error: Unexpected boolean "--noPrependStageInUrl". This error does not occur with the preceding version 2.31.0.

Sample Code

  • file: serverless.yml
service: graph-api

provider:
    name: aws
    stage: ${opt:stage}
    runtime: nodejs12.x

functions:
    graphql:
        handler: source/graphql.handler
        memorySize: 1024
        timeout: 30
        events:
            - http:
                  path: /
                  method: get

plugins:
    - serverless-offline

Expected behavior/code

Running the command succeeds.

Environment

  • serverless version: 2.32.0 (latest)
  • serverless-offline version: 6.9.0 (latest)
  • node.js version: 12.18.0
  • OS: macOS Big Sur 11.2.3

Additional context/Screenshots

It looks like changes were made in serverless version 2.32.0 to "Validate command and options against resolved schema" and "Recognize CLI command plugin extensions in new resolver". Thinking one of these might be related to the issue.

Screen Shot 2021-03-30 at 6 49 28 PM

Most helpful comment

It should be fixed with 2.32.1 release that will come out in < 1 hour

All 8 comments

downgrading sls to 2.31.0 worked for me

It should be fixed with 2.32.1 release that will come out in < 1 hour

Hmm still seeing this locally with both the global and local version set to 2.32.1. Locked ours a little further down to 2.30.3 and it's working. When testing locally only the local version had to be locked, but in CI/CD the global version had to be locked as well.

Screen Shot 2021-03-31 at 9 42 49 AM

@scherroman Could you share a minimal reproducible serverless.yml? Are you using variablesResolutionMode?

@pgrzesik here's (i think) a minimal reproducible serverless.yml, similar to the one in the bug report above but smaller with not much needed to trigger the error:

service: my-service

provider:
    name: aws

plugins:
    - serverless-offline

Also not using variablesResolutionMode

@pgrzesik @scherroman

I am getting same error for other flags too e.g

--noAuth
--noTimeout

It's an issue on Framework side, we'll be fixed shortly. Stay tuned

Fix was published with v2.33.0, sorry for confusion

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattmeye picture mattmeye  路  4Comments

conradoramalho picture conradoramalho  路  3Comments

ghost picture ghost  路  4Comments

yareyaredesuyo picture yareyaredesuyo  路  4Comments

davidroman0O picture davidroman0O  路  4Comments