title | description | position | category |
---|---|---|---|
Installation |
Serverless Devs Tool installation and upgrade |
2 |
Overview |
- Tool installation
- Install via command line tool
- [Install by downloading the binary](#Install by downloading the binary) --- Suitable for all platforms (Windows/Mac/Linux)
- Install via script
- Tool upgrade
Install via npm package management: applicable to Windows, Mac, and Linux platforms that have been pre-installed with npm. Execute the following commands on Windows, Mac, and Linux platforms to install Serverless Devs Tool.
$ npm install @serverless-devs/s -g
Or install via yarn
$ yarn global add @serverless-devs/s
illustrate:
- If you execute the command under Linux or macOS and report an error and the error message is
Command not found
, please execute the commandln -s serverless-devs installation location /usr/bin
, serverless-devs installation location can be found byfind / -name s
.- If an error is reported when executing this command under Linux and the error message is
Error: EACCES: permission denied
, please execute the commandsudo npm install @serverless-devs/s -g
.- If you have a slow installation process in mainland, you can consider using Taobao npm source. The installation command is
npm --registry=https://registry.npm.taobao.org install @serverless-devs/s -g
.
Open the releases page, select a release compressed package link corresponding to the platform in the latest version, and click to download directly.
After downloading locally, unzip it and use it directly.
- Find a latest release version (Release) and download the
s-*-win.exe.zip
file (where * represents the version number, such as 2.1.9). - Unzip the file
s-*-win.exe.zip
to gets-*.win.exe
file, rename it tos.exe
. - Just copy the s.exe file to the system PATH directory, for example:
C:\WINDOWS\System32
- Open the command terminal, execute
s.exe --version
, and check the returned version number to verify whether the installation is successful.
- Find a latest release version (Release) and download the
s-*-linux.zip
file (where * represents the version number, such as 2.1.9). - Extract the zip file
$ unzip s-linux.zip
Archive: s-2.1.9-linux.zip
inflating: s-2.1.9-linux
- Move to PATH directory
$ mv s-*-linux /usr/local/bin/s
- Verify version
$ s -v
@serverless-devs/s: 2.1.9
- Find the latest release version (Release) and download the
s-*-macos.zip
file (where * represents the version number, such as 2.1.9). - Extract the zip file
$ unzip s-macos.zip
Archive: s-2.1.9-macos.zip
inflating: s-2.1.9-macos
- Move to PATH directory
$ mv s-*-macos /usr/local/bin/s
- Verify version
$ s -v
@serverless-devs/s: 2.1.9
For Mac/Linux users
$ curl -o- -L http://cli.so/install.sh | bash
Serverless Devs developer tools will be updated and upgraded from time to time. When developers use Serverless Devs developer tools, they can be aware of the latest version according to system reminders.
After the client perceives the system upgrade, the developer can use the command npm i -g @serverless-devs/s
to update, or use Release View the specific content of the upgrade to determine whether to perform this upgrade.
For example: My current Serverless Devs version is
2.0.89
. After the system is upgraded, I will use the Serverless Devs developer tool, and the tool will give a corresponding reminder:╭───────────────────────────────────────────────╮ │ │ │ Update available 2.0.89 → 2.0.90 │ │ Run npm i -g @serverless-devs/s to update │ │ │ ╰───────────────────────────────────────────────╯At this point, just follow the reminder to update the tool.