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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With