IT/Linux
startup bash too slow with nvm loading in .bashrc config
bepuri
2024. 4. 5. 14:34
728x90
1. Remove your ~/.nvm, if you are worried about some crash or issue, Just move ~/.nvm ~/.nvm_bak
2. Install nvm with nvm-setup.exe(https://github.com/coreybutler/nvm-windows/releases)
3. And do same thing, installing new node version and use it in powershell.
4. Reload your git bash , you can see your node version changes with no performance issue.
이걸로 몇십분 시간을 보냈는데, github(https://github.com/microsoft/WSL/issues/776)에서 언급되는 솔루션은 다 lazy_loading(필요할때 로딩하는) 외에는 없었고, 사실 lazy_loading하는것도 느림;; 그리고 결정적으로 nvm이 로드 되어있지 않으면 node 버전이 제대로 출력이 안되서, 답답한 노릇~
결국 2번에서 언급한 깃헙 레포에 들어가서 기존 ~/.nvm폴더를 제거하고 window 버전으로 깔고 설치된 nvm으로 노드 버전을 설정해주면되고 gitbash는 알아서 반영됨~
728x90