07-21-2023, 03:35 PM
Some of the answers provided are correct and upvoted, but somewhat incomplete. This procedure worked for me:
1. Open the terminal window ***inside* VS Code** and run `node -v`. You'll get for instance `v10.12.0`.
2. Open a terminal window ***outside* VS Code** Change your **node** version with **nvm** (ie. `nvm use v12.14.0`)
3. `Cmd`+ `Shift` + `p` and choose **Preferences > Open Settings (JSON)**
4. Add `"terminal.integrated.shellArgs.osx": []` to your user config
5. `Cmd`+ `Shift` + `p` and choose **Shell Command: Install 'code' command in PATH**
6. *Close **VS Code***.
7. Open a terminal window and run `code`. This will open **VS Code** with a new and updated `bash` / `zsh` session.
8. Open the terminal window ***inside* VS Code** and run `node -v`. You'll get `v12.14.0`.
***Bonus:*** If you _always_ want to get a particular node version on **VS Code**'s terminal, set it as default by opening a terminal window ***outside* VS Code** and running:
```bash
nvm alias default v12.14.0
```
1. Open the terminal window ***inside* VS Code** and run `node -v`. You'll get for instance `v10.12.0`.
2. Open a terminal window ***outside* VS Code** Change your **node** version with **nvm** (ie. `nvm use v12.14.0`)
3. `Cmd`+ `Shift` + `p` and choose **Preferences > Open Settings (JSON)**
4. Add `"terminal.integrated.shellArgs.osx": []` to your user config
5. `Cmd`+ `Shift` + `p` and choose **Shell Command: Install 'code' command in PATH**
6. *Close **VS Code***.
7. Open a terminal window and run `code`. This will open **VS Code** with a new and updated `bash` / `zsh` session.
8. Open the terminal window ***inside* VS Code** and run `node -v`. You'll get `v12.14.0`.
***Bonus:*** If you _always_ want to get a particular node version on **VS Code**'s terminal, set it as default by opening a terminal window ***outside* VS Code** and running:
```bash
nvm alias default v12.14.0
```