bower cache backups: $BACKUP_DIR"Įcho "$REV""$CR""Uninstalling node.$CR$OFF"Įcho "Enter your password to remove user some node-related /usr/local directories"Įcho "$REV""$CR""Installing nvm.$CR$OFF"Įcho "$REV""$CR""Insert the following line in your startup script (ex: $HOME/.bashrc):$CR$OFF"Įcho "export NVM_DIR=\"\$(brew -prefix nvm)\" &. # Making backups, but in all likelyhood you'll just reinstall them (and won't need these backups)Įcho "Creating directory to store $HOME/.nvm. $CR"Įcho "Are you ready to install the latest version of nvm and npm and node version $NODE_VER_TO_INSTALL ?$CR"Įcho "Press CTL+C to exit -or- Enter to continue."Įcho """$REV""Uninstalling nvm.$CR$OFF" and pass the version number you want as the only param to $MY_NAME. If thenĮcho "Likely, you'll need to do what it suggests."Įcho "Likely, you'll need to run: $ brew update$CR"Įcho "To install latest node version, run the following command to get the latest version: $ nvm ls-remote"Įcho ". # purpose: To cleanly install NVM, NODE and NPMīACKUP_DIR=$HOME/backups/nvm-npm-bower-caches/$NOW Plus, I had to add a few settings to my startup script to make things work smoothly. If you have previously installed node using brew, then you will have a bunch of extra files that you should clean up before installing node "the right way". I'd use npm but you really should just follow the install instruction for each modules following the directions on there website as they will be more aware of any issue or bug they have than anyone else Since one of the core ideas behind Homebrew is that apps can be installed without giving them root access, this is a bad idea. You can read more on the topic in DanHerbert's post Fixing npm On Mac OS X for Homebrew Users, where he goes on to sayĪlso, using the Homebrew installation of npm will require you to use sudo when installing global packages. I've seen a few places suggested that you should use Homebrew to install Node (like alexpods answer and in this Team Treehouse blog Post) but installing this way you're more prone to run into issues as npm and brew are both package managers and you should have a package manager manage another package manager this leads to problems, like this bug offical npm issues Error: Refusing to delete: /usr/local/bin/npm or this Can't uninstall npm module on OSX You SHOULD NOT use brew to install node and npm. I'm super late to this but I didn't like the other answers Installing Homebrew
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |