openEuler欧拉安装指定版本的nodejs

1. 安装nodejs

dnf -y install nodejs
npm config set registry https://registry.npmmirror.com -g
npm config get registry https://registry.npmmirror.com

2. 安装n

npm install n -g
npm cache verify 
n 10 # 选择版本10 安装后npm出错
n 16 # 装个新版的
n  #择机选择回10
posted @ 2024-01-12 11:23  李济宏(Amadeus)  阅读(124)  评论(0编辑  收藏  举报