安装篇-nodejs 12.x 安装


1、安装

yum clean all && yum makecache fast
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
yum install nodejs -y

2、配置

    1. 命令
npm config set registry https://registry.npm.taobao.org
    1. 验证命令
npm config get registry

如果返回https://registry.npm.taobao.org,说明镜像配置成功。

3、cnpm安装

    1. 安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
    1. 使用cnpm
cnpm install xxx


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM