openEuler欧拉安装指定版本的nodejs.240112

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 @ 2025-01-06 09:25  中国的Amadeus  阅读(403)  评论(0)    收藏  举报