has anyone aliased npm to run nvm first, and then run npm, passing in the arguments?
or have people made nvm run when their system or terminal window starts so that they don't have to remember to do it
or have people made nvm run when their system or terminal window starts so that they don't have to remember to do it
UPDATE_NVM='[ -e .nvmrc ] && [ v$(<.nvmrc) != $(node --version) ] && nvm use'
PROMPT_COMMAND="$UPDATE_NVM; ...other prompt commands..."Many of these version managers always simply can't be involved outside interactive shells because they require unit script to be loaded first.