[Share Experiences] 安装新版npm(小白向)
Tofloor
poster avatar
青稚
deepin
2023-03-20 01:43
Author

具体安装请看下文.

打开https://deb.nodesource.com/

根据里面的命令添加源

NodeSource源被启用后,输入命令:

sudo apt install nodejs

nodejs包含node和npm二进制包。

验证是否正确安装

验证node: node --version

验证npm: npm --version

需要从npm编译本地扩展,安装开发工具。

sudo apt build-essential

以上就是这些,感谢大家支持。

Reply Favorite View the author
All Replies
ad1998
deepin
2023-03-20 01:49
#1

沙发tail ,前端小伙伴们加油!推荐大家学习electron ,tuari等跨平台方案架构

Reply View the author
爱开发
deepin
2023-03-20 05:32
#2

https://volta.sh/ 啊,比 nvm 好用。

Reply View the author
fuuko
deepin
2023-03-20 16:28
#3

我觉得这种定制开发环境可能用docker或者虚拟机更好?

Reply View the author
master
deepin
2023-05-10 19:26
#4

https://deb.nodesource.com/setup_18.X 后边的应该是个小写的x,大写的直接404

curl -sL https://deb.nodesource.com/setup_18.x

curl -sL https://deb.nodesource.com/setup_20.x

Reply View the author
青稚
deepin
2023-05-10 19:30
#5
master

https://deb.nodesource.com/setup_18.X 后边的应该是个小写的x,大写的直接404

curl -sL https://deb.nodesource.com/setup_18.x

curl -sL https://deb.nodesource.com/setup_20.x

已经修改,感谢提醒。

Reply View the author
lmcbjn
deepin
2023-06-02 16:25
#6

为什么按照楼主方式装完后还是v10.21.0版本。

Reply View the author
lmcbjn
deepin
2023-06-02 16:38
#7
lmcbjn

为什么按照楼主方式装完后还是v10.21.0版本。

按照一楼推荐的“用 https://volta.sh/ 啊”搞定了。谢谢

Reply View the author
lmcbjn
deepin
2023-06-02 16:38
#8
爱开发

https://volta.sh/ 啊,比 nvm 好用。

一键搞定,感谢。

Reply View the author
青稚
deepin
2023-06-02 18:13
#9
lmcbjn

为什么按照楼主方式装完后还是v10.21.0版本。

加源后输入sudo apt update后安装,有说刷新缓存。

Reply View the author
lmcbjn
deepin
2023-06-06 00:32
#10
青稚

加源后输入sudo apt update后安装,有说刷新缓存。

感谢楼主

Reply View the author
HackerNotTerminal
deepin
2023-08-23 21:24
#11

经过测试,deepinv20中不能直接用“curl -sL https://deb.nodesource.com/setup_18.x”,要在后面加上“| bash”,即“curl -sL https://deb.nodesource.com/setup_18.x | bash”,不知道啥情况

Reply View the author