openEuler欧拉安装指定版本的nodejs

李济宏(Amadeus Lee) / 2024-01-12 / 原文

1. 安装nodejs

dnf -y install nodejs
npm config set registry https://registry.npm.taobao.org -g
npm config get registry https://registry.npm.taobao.org/

2. 安装n

npm install n -g
npm cache verify 
n 10
n # 选择版本10