CLI options definitions were upgraded with "type" property

I deployed using sls 3.18.2 and I’ve gotten this error

CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
 - Offline for "prefix", "host", "port", "stage", "region", "skipCacheInvalidation", "cacheInvalidationRegex", "httpsProtocol", "location", "noTimeout", "noEnvironment", "resourceRoutes", "dontPrintOutput", "corsAllowOrigin", "corsAllowHeaders", "corsExposedHeaders", "corsDisallowCredentials", "apiKey", "exec", "noAuth", "useSeparateProcesses", "preserveTrailingSlash", "disableCookieValidation"
Please report this issue in plugin issue tracker.
Starting with next major release, this will be communicated with a thrown error.
More info: https://serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA_V3

Can’t find how to solve this.

serverless.yml

service: backend-${self:custom.customDomain.basePath}

configValidationMode: error

provider:
  name: aws
  runtime: nodejs12.x
  stage: ${opt:stage, 'test'}
  region: us-east-1
  environment:
    BASE_PATH : ${self:custom.customDomain.basePath}
    NODE_PATH: /mnt/deps-lambda/node_modules
  iamManagedPolicies:
    - arn:aws:iam::aws:policy/AmazonS3FullAccess
    - arn:aws:iam::aws:policy/AWSLambda_FullAccess
    - arn:aws:iam::aws:policy/AmazonSSMFullAccess
    - arn:aws:iam::aws:policy/AmazonSESFullAccess
    - arn:aws:iam::aws:policy/AmazonEC2FullAccess
    - arn:aws:iam::aws:policy/AmazonElasticFileSystemFullAccess
  stackTags:
  vpc: ${file(./settings.yml):vpc_settings.${self:provider.stage}}

plugins:
  - serverless-offline
  - serverless-domain-manager

package:
  patterns:
    - '!node_modules/**'

custom:
  domains:
    prod: prod.com
    test: test.com
  customDomain:
    domainName: ${self:custom.domains.${self:provider.stage}} # Change this to your domain.
    basePath: 'micro' # This will be prefixed to all routes
    stage: ${self:provider.stage}
    createRoute53Record: true

functions:
  # 1
  getService:
    handler: index_${self:custom.customDomain.basePath}.handler
    events:
      - http:
          path: /api/getService
          method: post
 

Ensure to upgrade serverless-offline plugin to latest version

1 Like

I solved by deleting the property --dontPrintOutput

upgrade serverless-offline to 8.8.0 and change the offline config fixed the issue.(port to httpPort)

custom:
  serverless-offline:
    httpPort: 4444