Getting Started
Complete Setup
Getting Started with AVS-SDK
Welcome to the Getting Started guide for AVS-SDK! This guide will help you set up the SDK on your machine and provide tips for different installation methods. Whether you're working on Linux, macOS, or Windows, AVS-SDK is easy to install via npm
, yarn
, pnpm
, or bun
. Alternatively, you can also clone the AVS-SDK repository directly from GitHub.
Prerequisites
To use AVS-SDK, ensure you have:
Node.js (v14.0 or later recommended) installed on your system.
Git installed if you’re opting for a clone installation.
To verify if Node.js is installed:
If Node.js is not installed, download and install it from Node.js official website.
Step 1: Install AVS-SDK
Method 1: Using npm
For most users, installing with npm
is straightforward:
Method 2: Using yarn
If you prefer using yarn
:
Method 3: Using pnpm
For pnpm
users:
Method 4: Using bun
To install with bun
, make sure bun is installed and run:
Method 5: Git Clone
You can also directly clone the AVS-SDK repository from GitHub. This method is useful if you’d like the latest version or if you wish to explore and modify the code.
Step 2: Set Up for Different Operating Systems
Linux Installation Guide
Install Node.js (if not already installed):
You can use a package manager like
apt
ordnf
based on your Linux distribution. For example, on Debian/Ubuntu:Alternatively, install Node.js via Node Version Manager (NVM).
Install AVS-SDK:
Use one of the methods described above (e.g.,
npm install avs-sdk
).
Clone Setup:
If you prefer cloning from Git, run:
macOS Installation Guide
Install Node.js:
The easiest way on macOS is via
brew
:
Install AVS-SDK:
Choose an installation method as shown above (e.g.,
yarn add avs-sdk
).
Clone Setup:
If cloning, execute:
Windows Installation Guide
Install Node.js:
Download the Windows installer from Node.js website and follow the setup instructions.
Install AVS-SDK:
Open a terminal like PowerShell or the Command Prompt and install AVS-SDK (e.g.,
npm install avs-sdk
).
Clone Setup:
To clone the SDK from GitHub, open a Git-enabled terminal and run:
Troubleshooting Installation Errors
Here are some common installation issues you might encounter and tips to resolve them:
1. Node Version Errors
If you encounter compatibility issues with the Node version, make sure to use v14.0 or higher. Using NVM (Node Version Manager) can be very helpful to switch Node versions quickly.
2. Permission Errors on Linux/macOS
Sometimes, Linux or macOS may require root privileges to install global packages. If you receive a permission error, try prefixing your command with sudo
, like this:
3. npm
or yarn
Not Found
Ensure that your package manager is installed and available in your system’s PATH. If it’s missing, re-install Node.js, which usually includes npm
, or install yarn
separately by following instructions on the Yarn website.
4. Installation Failure on Windows
If installation fails, try running your terminal as Administrator. Right-click on your terminal and select “Run as Administrator,” then retry the installation command.
5. Git-Related Issues
If you’re cloning and encounter a “command not found” error for git
, install Git from Git's official website and ensure it’s accessible from the terminal.
Verifying Your Installation
After installing, you can confirm the SDK is correctly installed by running:
Next Steps
Now that AVS-SDK is installed, you’re ready to explore its core features. In the next sections, we’ll guide you through setting up your first connection with the AVS Node Manager and using essential modules like AVSNode
, AVSSmartContract
, and more to start building decentralized services effortlessly.
Last updated