Contact Us
Log In

Build Development Environment

Last Updated on : 2022-03-01 07:55:00download

This topic describes how to build a development environment for panel SDK development. Before panel SDK development, you need to install NVM and Yarn. For macOS, you also need to install Homebrew and Watchman.

Install development tool

The following editors are recommended for panel SDK development. Download and install as needed.

  • Visual Studio Code (Recommended): a tool with built-in common functions such as formatting and code jump. The community contributes much to development.
  • WebStorm: a highly integrated IDE.
  • Sublime Text: a small and lightweight tool.
  • Atom: a small and lightweight tool.

Install NVM

Note: If this is your first installation, set up the environment variable as per the instruction.

  1. Open the terminal.

  2. Install the Node Version Manager (NVM).

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
  3. (Optional) Enter nvm -v to confirm proper NVM installation.

    Note: If the version number is indicated, the installation is successful. If the error nvm: command not found occurs, refer to the FAQ section at the bottom.

  4. Enter nvm install 10.15.0 to install Node.js 10.15.0.

    Note: It is recommended to install Node.js 10.15.0 or a later version.

  5. (Optional) You can switch to a specified Node.js version through the nvm use command.

    nvm use 10.15.0

Install Yarn

  1. Open the terminal.

  2. Enter npm install -g yarn to install Yarn.

  3. (Optional) Enter yarn -v to confirm proper Yarn installation.

Install Homebrew and Watchman

Note: This step is only for macOS.

  1. Open the terminal.

  2. Enter the following command to install Homebrew.

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Enter brew install watchman to install Watchman.


Q: Why do I get the error message nvm: command not found when I enter nvm -v?

A: The path where NVM is stored might not be set as an environment variable. You can follow the following steps:

  1. Open the terminal.

  2. Enter cd ~ to enter the current home directory.

  3. Enter the following command to open the configuration file.

    • Linux, Windows and other systems

      open .bash_profile
    • New macOS

      open .zshrc
  4. Copy the following code to the configuration file and save the file.

    export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
  5. Enter source .bash_profile or source .zshrc to reload the configuration file.

  6. Enter nvm -v to check the NVM version and verify whether the installation is successful.

Q: Why cannot I install Homebrew on my macOS?

A: If you do not install Xcode Command Line Tool on your macOS, the Homebrew installation might fail.

  • Solution 1: Install Xcode.

  • Solution 2: Use the command to install online.

    1. Open the Terminal on Mac.
    2. Enter cd ~ to enter the current home directory.
    3. Enter xcode-select --install to install Xcode Command Line Tool.


During the process of installing or running RN, if an error message occurs, you can refer to the documentation about common errors in the RN community.