tencent cloud

Feedback

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
    
    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