1111mp / nvm-desktop

Node Version Manager Desktop - A desktop application to manage multiple active node.js versions.
https://github.com/1111mp/nvm-desktop
MIT License
621 stars 31 forks source link

能否支持cnpm yarn pnpm npx nvm 等包管理器 #69

Closed chenyueteng closed 2 months ago

chenyueteng commented 4 months ago

能否支持cnpm yarn pnpm npx nvm 等包管理器

问题: npm install pnpm -g 后 ,使用 pnpm 报 nvm-desktop: command not found: pnpm

1111mp commented 4 months ago

支持的,这个信息提示你查看一下这里看能否帮助到你:(https://github.com/1111mp/nvm-desktop/issues/23)

你可以通过npm config get prefix查看全局安装包的路径,然后不是默认位置修改过就将这个目录路径添加到系统环境变量中

cn-liu commented 3 months ago

我将npm全局依赖包指向一个固定的文件夹并且设置npm的config prefix 和环境变量,但依旧是nvm-desktop: command not found: ‘依赖包’ ,

1111mp commented 3 months ago

@cn-liu 终端运行 npm config get prefix 输出什么,然后能够将该目录下的文件截图发出来看一下吗

然后请确认将该目录添加到系统环境变量里面,且让其的优先级比 %HOMEPATH%.nvmd\bin 高(即位置靠前)

cn-liu commented 3 months ago

@1111mp 感谢,已解决!,是环境变量的问题,原因是npm环境变量低于nvm环境变量找不到命令

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.