tencent cloud

All product documents
API Gateway
Installing Serverless Framework
Last updated: 2023-12-22 10:04:20
Installing Serverless Framework
Last updated: 2023-12-22 10:04:20
This document describes how to quickly install Serverless Framework through binary installation or npm.

Installing

Method 1. Binary installation

If Node.js is not installed in your local environment, you can install it directly in binary mode:
Note:
You are recommended to use Node.js 10.0 or above; otherwise, Component v2 may report errors during deployment.

macOS/Linux

Open the command line and enter the following command:
$ curl -o- -L https://slss.io/install | bash
If you have already installed a binary version, you can run the following command to upgrade it:
$ serverless upgrade

Windows

Windows supports installation through Chocolatey. Open the command line and enter the following command:
$ choco install serverless
If you have already installed a binary version, you can run the following command to upgrade it:
$ choco upgrade serverless

Method 2. Installation through npm

Note:
You are recommended to use Node.js 10.0 or above; otherwise, Component v2 may report errors during deployment.
Run the following command on the command line:
$ npm install -g serverless
Note:
If macOS prompts that you have no permission, you need to run sudo npm install -g serverless for installation.
If you have already installed Serverless Framework, you can run the following command to upgrade it to the latest version:
$ npm update -g serverless
If Node.js is not installed in your environment, you can install it as instructed in Node.js Installation Guide based on your system environment.

Viewing Version Information

After the installation is completed, run the serverless -v command to view the version information of Serverless Framework:
$ serverless -v

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon