Node.js and cnpm need to be installed for the front-end development workspace. This topic guides you to build environments for different operating systems. If you use Windows operating system, you need to complete user configuration first.
Build front-end development workspace in Windows
Complete Windows user configuration. Follow the figure below to install the
MinGW
command prompt. Download the installation file at git-scm.Download and install Node.js v8.
Install cnpm.
In MinGW or on a terminal, run the following command to install
cnpm
:npm install -g cnpm --registry=http://registry.npmmirror.com
NoteDo not install
cnpm
inalias
method that is used for adding thenpm
parameter. For more information aboutcnpm
, see NPM mirror.After cnpm is installed, run the following command to verify the installation.
cnpm -v cnpm@6.1.0 (C:\Users\wb-wly538545\AppData\Roaming\npm\node_modules\cnpm\lib\parse_argv.js) npm@6.11.3 (C:\Users\wb-wly538545\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\lib\npm.js) node@8.11.1 (D:\Program Files (x86)\nodejs\node.exe) npminstall@3.23.0 (C:\Users\wb-wly538545\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\index.js) prefix=C:\Users\wb-wly538545\AppData\Roaming\npm win32 ia32 10.0.17134 registry=https://r.npm.taobao.org
Build front-end development workspace in macOS
Download and install Node.js v8.
Install cnpm.
In MinGW or on a terminal, run the following command to install
cnpm
:npm install -g cnpm --registry=http://registry.npmmirror.com
NoteDo not install
cnpm
inalias
method that is used for adding thenpm
parameter. For more information aboutcnpm
, see NPM mirror.After cnpm is installed, run the following command to verify the installation.
cnpm -v cnpm@6.1.0 (C:\Users\wb-wly538545\AppData\Roaming\npm\node_modules\cnpm\lib\parse_argv.js) npm@6.11.3 (C:\Users\wb-wly538545\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\lib\npm.js) node@8.11.1 (D:\Program Files (x86)\nodejs\node.exe) npminstall@3.23.0 (C:\Users\wb-wly538545\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\index.js) prefix=C:\Users\wb-wly538545\AppData\Roaming\npm win32 ia32 10.0.17134 registry=https://r.npm.taobao.org