安裝npm
dnf install npm
設置全局安裝路徑和緩存路徑
mkdir /first/application/npm/node_global
mkdir /first/application/npm/node_cache
chmod 775 /first/application/npm/node_global
chmod 775 /first/application/npm/node_cache
npm config set prefix "/first/application/npm/node_global"
npm config set cache "/first/application/npm/node_cache"
設置源
npm config set registry https://registry.npm.taobao.org