bash
# echo $PATH
/root/.vscode.../server/bin/remote-cli:/root/.nvm/versions/node/v16.20.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
修改VSCode用户设置
- 在VSCode中按 Ctrl+Shift+P,搜索
Preferences: Open Settings (JSON)
- 添加
bash
{
"terminal.integrated.env.linux": {
"PATH": "/root/.nvm/versions/node/v22.17.1/bin:${env:PATH}"
}
}
bash
# node --version
v22.17.1