简体   繁体   中英

Problem choosing node version in Terminal - MacOS Ventura

Whenever I start a new session in iTerm or the Terminal in MacOS Ventura, I get the system label on the right.

在此处输入图像描述

A problem I'm facing is that whenever I want to change the node version, it cannot be done. It's always tied to the system version.

This is when I run nvm list . For default it's the right value: 16.18.1 . But when I run nvm use default , and run nvm list again, I still see system as the selected version.

在此处输入图像描述

Does anyone know why is still using the system one, instead of the default ?

I have no idea about the terminal prompt that appears on the right side.

I had the same issue, and I just added the below lines to the.zshrc file:

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] &&. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] &&. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

To use the latest version or the version that I installed on my machine, I tried the following:

nvm use <node_version>

I hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM