Last Updated on : 2024-06-05 03:14:28download
This topic describes how to build the environments required by panel development.
If your panel is developed on Windows, you must install:
If your panel is developed on macOS, you must install:
Before you develop an SDK-based panel, download and install the following recommended editors as needed:
Open the Terminal.
Install the NVM.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
(Optional) Enter nvm -v
to confirm that the NVM is installed as expected.
If a version number is returned, the installation is successful. If the error is returned: nvm: command not found
, follow the instructions in FAQs to fix the error.
Enter nvm install 14.21.3
to install Node.js v14.21.3.
The RN version is 0.59.10, so we recommend installing Node.js 14 or Node.js 12. Specifically, Node.js 12 is recommended for Windows and Node.js 14 for Mac.
(Optional) Run the command nvm use
to switch among Node.js versions.
nvm use 14.21.3
Open the Terminal.
Enter npm install -g yarn
to install Yarn.
(Optional) Enter yarn -v
to confirm that Yarn is installed as expected.
This section applies to macOS only.
brew install watchman
to install watchman.Make sure the development environment is built. Check the version number of each program to determine whether the installation is successful.
nvm -v
yarn -v
watchman -v
The command-line interface (CLI) tuya-panel-cli
is required during cloud development. To install it, run the following command:
MacOS & Linux
curl -fsSL https://cdn.jsdelivr.net/gh/tuya/tuya-panel-cli/install.sh | sh
If this is your first installation, set up the environment variable as per the instruction.
Windows PowerShell
iwr https://cdn.jsdelivr.net/gh/tuya/tuya-panel-cli/install.ps1 -useb | iex
The iwr
command cannot run on early versions of PowerShell. To resolve this problem, see iwr cannot be recognized on Windows.
Run tuya-panel-cli help
to see if all available commands are printed to determine whether the installation is successful.
The installation script might fail to be obtained due to network problems. In this case, follow the instructions in Manual installation or Mac/Linux manual installation to fix the problem.
nvm -v
is entered, why has the error been returned: nvm: command not found
?A: The possible reason is that the path where NVM is located is not specified as an environment variable. You can perform the following steps and set the environment variable:
Open the Terminal.
Enter cd ~
to go to the Home
directory of the current account.
Run the following command to open the configuration file.
Windows
open .bash_profile
Latest version of macOS
open .zshrc
Copy and paste the following code block to the configuration file and save the file.
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
Enter source .bash_profile
or source .zshrc
to reload the configuration file.
Enter nvm -v
to view the NVM version and check whether the installation is successful.
A: If you have not installed Xcode command-line tools on your computer, the installation of Homebrew might fail.
Method 1: Install Xcode.
Method 2: Run the online installation command to install Homebrew.
cd ~
to go to the Home directory of the current account.xcode-select --install
to install Xcode command-line tools.During the installation or running of React Native (RN), if an error message appears, you can check the troubleshooting document from the RN community.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback