Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

期望界面增加一键安装全局包的功能 #77

Open
TanxiangCode opened this issue Apr 19, 2024 · 2 comments
Open

期望界面增加一键安装全局包的功能 #77

TanxiangCode opened this issue Apr 19, 2024 · 2 comments
Labels

Comments

@TanxiangCode
Copy link

可以在界面上一键全局安装cnpm yarn pnpm等包,避免切换版本后,需要手动的使用-g命令安装。甚至如果能直接自定义命令就更好了。配置后,每次切换node版本后只需要点一下就执行了。。

@1111mp
Copy link
Owner

1111mp commented Apr 19, 2024

nvm-desktop 设计之初就是想让每个node之间都相互隔离、互不影响的,就跟自己本地新安装node一样。

不过应该有一个办法能够暂时解决这个问题,就是通过 npm config set prefix "/path/to/folder" 更改全局安装包的位置,这样切换 node 版本之后也能共用,就不需要再重新安装了。不过需要注意的是需要将 "/path/to/folder" 目录添加到系统环境变量(保证其优先级),具体可以参考:(#23)

Copy link

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

@github-actions github-actions bot added the stale label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants