青蛙小白
目录

Node.js

安装NodeJS

MacOS/Linux

安装nvm

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

安装最新的LTS版本的Node

# "node" is an alias for the latest version
nvm install node 

# Install the latest LTS version.
nvm install --lts

设置shell的默认 Node.js 版本:

nvm alias default v22.17.0

切换npm源:

echo 'registry=https://registry.npmmirror.com/
always-auth=false' > ~/.npmrc

npm全局包检查

列出所有全局包和路径:

npm list -g --depth=0

清理卸载:

npm uninstall -g <packageName>
评论