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 [email protected]
But when I ran this command serverless --version it is still showing the version 2.41.2 on my pc.
In addition to being installed globally via NPM,
serverlesscan also be a project dependency. If you're working in a node project, ensure thatserverlessisn't listed in thepackage.jsonfile or in thepackage-lock.jsonfile.If so, run
npm uninstall serverlessand thennpm install -d [email protected], to install the framework in the project at the correct version.