Updated on 2024-02-28 GMT+08:00

Installing the SDK

If you have any questions during development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see the API Reference.

(Recommended) Installing the SDK Using npm

  1. Run the npm -V command to check the npm version and ensure that the npm is installed.
  2. Run the npm install esdk-obs-nodejs command to start the installation.
  • On a Windows operating system, the message "Not internal or external command" is displayed when you run the npm command. In this case, add the npm installation directory (generally the installation directory of Node.js) to the Path environment variable.
  • You may need to restart the computer for the environment variables to take effect.
  • If you use npm to install dependencies and the network malfunctions, use proxies.

Installing the SDK Using Source Codes

The following procedures use OBS Node.js SDK of the latest version as an example.

  1. Download the OBS Node.js SDK by referring to SDK Download Links.
  2. Decompress the development package to obtain folder examples (sample code), folder lib (SDK source code), file package.json (dependency configuration file), and file README.txt (feature description file of SDK versions).
  3. On the command-line interface (CLI), go to the directory under which the SDK development package is decompressed, and run the npm install command to install dependency libraries. The node_modules folder will be generated.
  4. (Optional) In the Eclipse JavaScript project, import the source code: Open Eclipse JavaScript IDE and choose Import > Projects from Folder or Archive. For Import source, select the directory under which the SDK development package is decompressed.

After the installation, the directory structure is similar to the following:

├── examples

├── lib

├── node_modules

├── package.json

└── README.txt