posts/nvm-auto-switch/ #6
Replies: 2 comments
-
这个切换的是全局的 node 版本吗 ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
两个步骤实现根据项目自动切换:
1. 按照博客注册shell hook,在初始化和切换目录时执行对应脚本读取nvm配置并执行
2. 在对应项目配置.nvmrc,也如文中一样 `node -v > .nvmrc` 即可
CyberChuan ***@***.***> 于2025年5月21日周三 23:29写道:
… 这个切换的是全局的 node 版本吗 ?
有没有那种仅切换A工程下的版本,B工程下的版本保持不变的 ?
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEU4BTC7HFX3Z5QJ27LUKYT27SLVFAVCNFSM6AAAAAB5TT35WGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMRSGE4DCNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: <KiritoKing/notion-astro-rev/repo-discussions/6/comments/13221817@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
posts/nvm-auto-switch/
通过创建 .nvmrc 文件和配置自动切换脚本,可以实现Node.js版本的自动切换,提高开发效率并避免版本不匹配的问题。建议将 .nvmrc 文件提交到版本控制,并在项目README中说明版本要求。
https://chlorinec.top/posts/nvm-auto-switch/
Beta Was this translation helpful? Give feedback.
All reactions