Installing Serverless Framework

Last updated: 2020-07-10 10:45:19

    This document describes how to quickly install Serverless Framework through binary installation or npm.

    Method 1. Binary installation

    If Node.js is not installed in your local environment, you can install it directly in binary mode:

    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

    Run the following command on the command line:

    $ npm install -g serverless

    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

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

    $ serverless -v

    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.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help