Configure cnpm and possible problems

The configuration cnpmrequires nodean environment. Please ensure that your computer has nodean environment . If not, you can ndoedownload the installation package from the official website and install it yourself. You can also refer to the relevant installation tutorials to install.

Configuration cnpmrequires entering the following command line in the terminal:

npm install -g cnpm --registry=https://registry.npm.taobao.org

After the installation is complete, you can cnpm -vcheck whether the installation is successful, and you may encounter a problem:
insert image description here

When encountering this problem, it is generally due to insufficient permissions. Open our as an administrator Windows PowerShell, enter the command set-ExecutionPolicy RemoteSigned, and the following prompt will appear:
insert image description here

Enter y to set successfully, and then enter get-ExecutionPolicydisplay RemoteSigned to indicate that the setting has been successful:
insert image description here

Then go to the terminal cnpm -vand enter, if the following picture appears, it means that the configuration is successful!
insert image description here

Guess you like

Origin blog.csdn.net/Ljwen_/article/details/126860554