Environment variable setting of npm global installation package on mac

I download and install nvm directly on the official website, not through homebrew
then I want to set up a global package

in node under nvm.
npm config set prefix ~/.nvm/npm-global

I installed cnpm, globally first. I found the execution file in

clipboard.png

.bash_profile.bashrc

clipboard.png


$PATHecho $PATH

clipboard.png

bin:

clipboard.png

echo $PATH
/Users/lyw/.nvm/versions/node/v8.11.1/bin:/Users/lyw/.nvm/npm-global/adada:/Users/lyw/.nvm/npm-global/adada:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

so I don"t know what the problem is.
ask God for help.

Mar.09,2021
Menu