Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Bug Report
Error Description
The serverless package is listed as a peer dependency on your package.json. My team still uses sls@2, and as sls@3 has now been released and your matching rule is <4, the plugin is locally downloading a copy of version 3. As we have many serverless projects, we usually run it globally, reducing the size of npm downloads within our integration pipelines. Therefore, the peer dependency now impedes our deployments, generating an error.
Command Runsls deploy
Console Output
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless Error ----------------------------------------
Cannot run local installation of the Serverless Framework by the outdated global version.
Please upgrade via:
npm install -g serverless
Note: Latest release can run any version of the locally installed Serverless Framework.
Alternatively run locally installed version directly via:
npx serverless <command> <options>
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 14.17.5
Framework Version: 2.72.3
Plugin Version: 5.5.4
SDK Version: 4.3.2
Components Version: 3.18.2
Versions
Domain Manager version(s): v6.0.2
Node/npm version: v14.17.5/v7.24.2
Serverless Version: v2.72.3
Lambda Code: Javascript
Possible Solution
I would argue that the peer dependency is not necessary at all, as it is not directly reference in your code, but merely injected through the plugin invocation. It is now also detrimental, as having it in there is hurting people with different setups.
My request is for the peer dependency to be completely removed, allowing developers to define how they want to use serverless.
Community Note
Bug Report
Error Description The
serverless
package is listed as a peer dependency on yourpackage.json
. My team still usessls@2
, and assls@3
has now been released and your matching rule is<4
, the plugin is locally downloading a copy of version 3. As we have many serverless projects, we usually run it globally, reducing the size of npm downloads within our integration pipelines. Therefore, the peer dependency now impedes our deployments, generating an error.Command Run
sls deploy
Console Output
Versions
Possible Solution I would argue that the peer dependency is not necessary at all, as it is not directly reference in your code, but merely injected through the plugin invocation. It is now also detrimental, as having it in there is hurting people with different setups.
My request is for the peer dependency to be completely removed, allowing developers to define how they want to use serverless.