关于#node的安装无法使用#的问题,如何解决?

在win11下,在Visual Studio Code开发工具下(C:\Program Files\Git\bash.exe --login -i)终端下用nvm1.1.7安装node18.15.0并运行nvm use 18.15.0时出现如下报错:
exit status 2: (null): can't open file '/c': [Errno 2] No such file or directory,
另,安装nam时,nvm路径改为了d:\nvmfolder\,node安装路径也改在了d:\nvmfolder\,安装18.15.0提示如下:
Downloading node.js version 18.15.0 (64-bit)...
Complete
Creating D:\nvmfolder\nvm\temp

Downloading npm version 9.5.0... Complete
Installing npm v9.5.0...

Installation complete. If you want to use this version, type

nvm use 18.15.0
但nvmfolder文件夹下并未出现nodejs文件夹

可能是由于在Git Bash中使用Windows路径引起的。
试试看
nvm install 18.15.0 --64 --prefix=/c/Users/yourusername/nvm/versions/node/v18.15.0
另外,如果您安装的是最新版本的nvm(目前是0.39.0),则需要在安装节点之前更新nvm:
nvm update
可以尝试手动安装npm,方法是在Git Bash中运行以下命令:
curl -L https://npmjs.org/install.sh | sh
然后
which npm
如果npm未正确安装,您可以尝试删除所有节点版本并重新安装nvm和节点,然后再次安装npm:
nvm uninstall node
rm -rf ~/.nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18.15.0
nvm use 18.15.0
npm install -g npm@9.5.0