1

By mistake I had installed the higher version of serverless on my pc. Now I want to degrade my serverless framework version from v2.41.2 to v2.35.0 due to some project requirements.

What I had tried to do:

I uninstalled the current serverless framework with npm uninstall -g serverless.

Then ran this command npm install -g serverless@2.35.0

But when I ran this command serverless --version it is still showing the version 2.41.2 on my pc.

Gibron
  • 1,350
  • 1
  • 9
  • 28
Arslan Ali
  • 408
  • 1
  • 6
  • 16

1 Answers1

5

In addition to being installed globally via NPM, serverless can also be a project dependency. If you're working in a node project, ensure that serverless isn't listed in the package.json file or in the package-lock.json file.

If so, run npm uninstall serverless and then npm install -d serverless@2.35.0, to install the framework in the project at the correct version.

Aaron Stuyvenberg
  • 3,437
  • 1
  • 9
  • 21