centos8安裝npm

安裝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
參考

LINUXCONFIG.ORG
CSDN

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章