nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slow Terminal Startup on Mac OS Due to nvm Usage

wangmings opened this issue · comments

Slow Terminal Startup on Mac OS Due to nvm Usage

Operating System: Mac OS

Problem Description:

The slow startup of the terminal on Mac OS is attributed to the inclusion of the following code. Terminal experiences delays during startup, and analysis reveals that the execution of nvm at the initiation of the terminal is causing significant delays.

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Please fill out the entire issue template - that's why it's there. Also, that is not a solution because it doesn't allow node, npm, and any other globally installed binaries to be available by default.

??????