sls create: Install missing plugins automatically
See original GitHub issueUse case description
The nice thing about Serverless Framework is the dev experience. sls create
/ sls deploy
.
But if the author has used a plugin, and you try to deploy it, you get something like this:
Serverless plugin "serverless-step-functions" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file.
Then you have to Google to find out you need to run something like:
sls plugin install -n serverless-step-functions
Proposed solution
If the plugin isn’t there, run the command automatically for the user to install the missing plugins.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Plugins - Serverless Framework
Plugins are installed per service. They are not applied globally. To install a plugin, run the following command in a service directory:
Read more >Serverless - Plugins - Tutorialspoint
Then, following the documentation, run the following command to install the plugin − sls plugin install -n serverless-python-requirements.
Read more >serverless-offline - npm
Serverless Offline. This Serverless plugin emulates AWS λ and API Gateway on your local machine to speed up your development cycles.
Read more >Serverless Framework | Epsagon Documentation
The plugin will be activated automatically during sls deploy , sls package , and sls invoke local events automatically. To cleanup any Epsagon-related...
Read more >Datadog Serverless Framework Plugin
The plugin automatically enables instrumentation for applications to collect metrics, traces, and logs by: Installing the Datadog Lambda library to your ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing as it can be considered as addressed with https://github.com/serverless/serverless/pull/9483
For project setup we’re moving from
sls create
tosls
, and when setting up the project withsls
dependencies are installed for copied template (released with v2.42.0)@a-h thanks for clarification, that significantly changes the scope, as
sls init
is a command we’ve implemented recently which follows up withnpm install
(ifpackage.json
is part of a template).I take then, this is a request to install missing plugins on
sls create
(so issuenpm install
ifpackage.json
is there) Note that in Serverless ecosystem it is assumed that plugins are published to npm, and it’s the only package manager that internally is supported by the CLI