Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serverless plugin "serverless-offline" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file

When I deploy my SLS project, I get the following error:

Serverless plugin "serverless-offline" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file

But I did install the plugin serverless-offline correctly, please can someone help me fix it.

Here is my serverless.yml file:

   service: email-sender

    provider:
      name: aws
      runtime: nodejs4.3

    functions:
      send:
        handler: handler.send
        events:
          - http:
              path: submissions
              method: post
              response:
                headers:
                  Content-Type: "text/json"
              cors:
                origins:
                  - '*'
    package:
      exclude:
        - node_modules/**
      include:
        - node_modules/serverless-offline/**

    plugins:
      - serverless-offline
like image 436
ner Avatar asked Sep 19 '17 14:09

ner


1 Answers

Please ensure that serverless-offline package is included in dev dependencies, if not then add it

"serverless-offline": "3.20.2"

and run,

npm install --save-dev

This solved my issue.

like image 97
Sksaif Uddin Avatar answered Sep 20 '22 04:09

Sksaif Uddin