The DevEco Studio development environment relies on an Internet connection to ensure the tools function properly.
Generally, if you are using a personal or home network, you do not need to configure proxy information. Proxy configuration is only necessary when you are on an enterprise network that has specific restrictions.
To get the most out of DevEco Studio, run a diagnostic test on your development environment and fix the failed items based on the provided suggestions. To start a diagnostic test, click Diagnose on the welcome page or choose Help > Diagnostic Tools > Diagnose Development Environment from the menu bar on the project page.

The diagnosis items include the computer configuration and network connectivity. Fix the failed items, if any, based on the provided suggestions.

During initialization, hvigor and ohpm need to download dependencies from the npm repository. If a proxy is required to access the network, configure the npm proxy as follows.
registry=https://repo.huaweicloud.com/repository/npm/ @ohos:registry=https://repo.harmonyos.com/npm/
proxy=http://user:password@proxy.proxyserver.com:port https-proxy=http://user:password@proxy.proxyserver.com:port
If the password contains special characters, such as @, #, and *, the configuration may not take effect. As such, you are advised to replace the special characters with ASCII codes and add a percent sign (%) before the ASCII codes. Refer to the following for the mapping between common symbols and ASCII codes:
Add the Node.js installation path, which is $DevEco Studio installation directory\tools\node by default, to Path under system or user variables.
export NODE_HOME=/home/xx/Downloads/node-vxx.xx.x-linux-x64 # Replace the path here with the Node.js installation path, which is $DevEco Studio installation directory\tools\node by default. export PATH=$NODE_HOME/bin:$PATH
npm info express
If the following information is displayed after running the command, it indicates that the proxy has been set up successfully.

Set the following fields:
https://ohpm.openharmony.cn/ohpm/
http://user:password@proxy.proxyserver.com
After you select and set the preceding fields, click OK.

Note: By default, ohpm verifies the registry address certificate. If a certificate verification error such as "SELF_SIGNED_CERT_IN_CHAIN" or "UNABLE_TO_VERIFY_LEAF_SIGNATURE" is displayed for ohpm registry access during environment diagnosis, see FAQ – Symptom 2 for troubleshooting.
The settings configured on this page are written into the .ohpmrc file in the users/username/.ohpmrc directory. This means that you can also configure the ohpm settings from this file. To do so:
registry=https://ohpm.openharmony.cn/ohpm/
http_proxy=http://user:password@proxy.proxyserver.com:port https_proxy=http://user:password@proxy.proxyserver.com:port
If the password contains special characters, such as @, #, and *, the configuration may not take effect. As such, you are advised to replace the special characters with ASCII codes and add "%" before the ASCII codes. Refer to the following for the mapping between common symbols and ASCII codes:
Choose This PC > Properties > Advanced System Settings > Advanced > Environment Variables, and add the bin folder path in the ohpm installation path to the Path environment variable under system or user variables. The default path is DevEco Studio installation directory\tools\ohpm.
export OHPM_HOME=/home/xx/Downloads/ohpm # Replace the path here with the ohpm installation path, which is /home/xx/Downloads/DevEco Studio installation directory\tools\ohpm by default. export PATH=$OHPM_HOME/bin:$PATH
ohpm info @ohos/lottie
If the following information is displayed after running the command, it indicates that the proxy has been set up successfully.
