Forked from nijicha/install_nodejs_and_yarn_homebrew.md
Created
September 7, 2019 18:53
-
-
Save fernandovega/b3103f40ea8cc4365d910b6f6a18dbf5 to your computer and use it in GitHub Desktop.
Revisions
-
nijicha revised this gist
Jul 30, 2019 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ## Getting start ### Part A: Install NVM and NodeJS 1. Install `nvm` via Homebrew @@ -53,7 +53,7 @@ See more about `nvm` : https://github.com/creationix/nvm ### Part B: Install Yarn 1. Install `yarn` via Homebrew and remove `node` dependencies from Homebrew @@ -71,13 +71,15 @@ See more about `nvm` : https://github.com/creationix/nvm $ `brew doctor` 4. Create symbol link from `nvm` for Homebrew. Pick a choice which suitable for you. a. This is for those who installed only one version via nvm $ `ln -s ~/.nvm/versions/node/ /usr/local/Cellar/` b. If you installed multiple node versions via `nvm`. You should create symbol link by current global version. Following this commands $ `nvm current` => v10.16.0 (Latest LTS: Dubnium) (This should be **Global** node version) $ `mkdir /usr/local/Cellar/node` -
nijicha revised this gist
Jul 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ 5. Verify `nvm` is installed $ `nvm --version` 6. Check all avaliable version by this command -
nijicha revised this gist
Jun 25, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -58,6 +58,7 @@ See more about `nvm` : https://github.com/creationix/nvm 1. Install `yarn` via Homebrew and remove `node` dependencies from Homebrew $ `brew install yarn` $ `brew uninstall node --ignore-dependencies` 2. Checkout `node` in environment `$PATH` -
nijicha revised this gist
Jun 25, 2019 . 1 changed file with 8 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,9 +39,9 @@ $ `nvm ls-remote` 7. Install NodeJS (_Recommended to install LTS version. Current LTS is Dubnium_) $ `nvm install --lts='Dubnium'` 8. Check installed NodeJS in your machine. @@ -55,15 +55,16 @@ See more about `nvm` : https://github.com/creationix/nvm ### Install Yarn 1. Install `yarn` via Homebrew and remove `node` dependencies from Homebrew $ `brew install yarn` $ `brew uninstall node --ignore-dependencies` 2. Checkout `node` in environment `$PATH` $ `which node` It should be return => `/User/<your's-user-name>/.nvm/versions/node/<latest-node-lts-version>/bin/node` 3. Checkout `brew doctor` there should show message **WARNING missing yarn dependencies** @@ -75,11 +76,11 @@ See more about `nvm` : https://github.com/creationix/nvm ** Note : If you installed multiple node versions via `nvm`. You should create symbol link by current global version. Following this commands ** $ `nvm current` => v10.16.0 (Latest LTS: Dubnium) (This should be **Current** LTS version) $ `mkdir /usr/local/Cellar/node` $ `ln -s ~/.nvm/versions/node/<latest-node-lts-version>/ /usr/local/Cellar/node` 4. Checkout `brew doctor` again. There shouldn't have **WARNING** message. -
nijicha revised this gist
Mar 9, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,6 +44,7 @@ $ `nvm install 8.10.0` 8. Check installed NodeJS in your machine. $ `nvm ls` 9. Set global nodejs version to environment. -
nijicha revised this gist
Mar 9, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,8 @@ $ `nvm ls-remote` 7. Install NodeJS (_Recommended to install LTS version. Current LTS is 8.10.0_) $ `nvm install 8.10.0` 8. Check installed NodeJS in your machine. -
nijicha revised this gist
Mar 9, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -74,7 +74,9 @@ See more about `nvm` : https://github.com/creationix/nvm ** Note : If you installed multiple node versions via `nvm`. You should create symbol link by current global version. Following this commands ** $ `nvm current` => v8.10.0 $ `mkdir /usr/local/Cellar/node` $ `ln -s ~/.nvm/versions/node/8.10.0/ /usr/local/Cellar/node` 4. Checkout `brew doctor` again. There shouldn't have **WARNING** message. -
nijicha revised this gist
Mar 9, 2018 . 1 changed file with 14 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -57,14 +57,26 @@ See more about `nvm` : https://github.com/creationix/nvm $ `brew install yarn --ignore-dependencies` 2. Checkout `node` in environment `$PATH` $ `which node` It should be return => `/User/<your's-user-name>/.nvm/versions/node/8.10.0/bin/node` 3. Checkout `brew doctor` there should show message **WARNING missing yarn dependencies** $ `brew doctor` 4. Create symbol link from `nvm` for Homebrew $ `ln -s ~/.nvm/versions/node/ /usr/local/Cellar/` ** Note : If you installed multiple node versions via `nvm`. You should create symbol link by current global version. Following this commands ** $ `nvm current` => v8.10.0 $ `mkdir /usr/local/Cellar/node` $ `ln -s ~/.nvm/versions/node/8.10.0/ /usr/local/Cellar/node` 4. Checkout `brew doctor` again. There shouldn't have **WARNING** message. $ `brew doctor` -
nijicha created this gist
Mar 9, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,70 @@ # Install NVM, NodeJS, Yarn via Homebrew ## Prerequisites - [Homebrew](https://brew.sh/) should be installed (Command line tools for Xcode are included). ## Getting start ### Install NVM and NodeJS 1. Install `nvm` via Homebrew $ `brew install nvm` 2. Create system directory for nvm $ `mkdir ~/.nvm` 3. Add following line to your profile. (`.profile` or `.zshrc` or `.zprofile`) ```bash # NVM export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh ``` 4. Close and open your terminal again. Or Choose one from the following command once for reload your profile. (`.profile` or `.zshrc` or `.zprofile`) Example - $ `source ~/.profile` - $ `source ~/.zshrc` - $ `source ~/.zprofile` 5. Verify `nvm` is installed $ `nvm -v` 6. Check all avaliable version by this command $ `nvm ls-remote` 7. Install NodeJS (_recommended to install LTS version. Current LTS is 8.10.0_) $ `nvm install 8.10.0` 8. Check installed NodeJS in your machine. $ `nvm ls` 9. Set global nodejs version to environment. $ `nvm use default` See more about `nvm` : https://github.com/creationix/nvm ### Install Yarn 1. Install `yarn` via Homebrew without `node` dependencies $ `brew install yarn --ignore-dependencies` 2. Checkout `brew doctor` there should show message **WARNING missing yarn dependencies** $ `brew doctor` 3. Create symbol link from `nvm` to Homebrew $ `ln -s ~/.nvm/versions/node/ /usr/local/Cellar/` 4. Checkout `brew doctor` again. There shouldn't have **WARNING** message. $ `brew doctor`