[Tutorials] deepin安装最新版nodejs和npm
Tofloor
poster avatar
lichengcheng
deepin
2021-01-22 19:19
Author

1:安装apt中的nodejs和npm

sudo apt-get install nodejs-legacy

sudo apt-get install npm 

2:npm修改成淘宝源,安装n模块

sudo npm config set registry https://registry.npm.taobao.org

sudo npm config list

sudo npm install n -g

3:安装最新的nodejs(stable版本)

sudo n stable

4:验证安装

sudo node -v

sudo npm -v

Reply Favorite View the author
All Replies
残念
deepin
2021-01-22 20:38
#1

推荐nvm

NVM

Reply View the author
akvon
deepin
2021-01-22 21:57
#2

这是做什么用的?

Reply View the author
lichengcheng
deepin
2021-01-25 00:53
#3
akvon

这是做什么用的?

做前端开发或者node开发的

Reply View the author
剥壳白煮蛋
deepin
2021-02-10 23:22
#4

谢谢,正好用上。

Reply View the author
terwer
deepin
2022-06-01 09:28
#5

支持,非常好用。

Reply View the author
66-88
deepin
2023-03-13 23:20
#6

淘宝镜像源换了成 https://npmmirror.com/这个了

sudo npm config set registry https://npmmirror.com/

Reply View the author