Move nvm sourcing into func. Use npm install under install_ui_deps