-
Star
(142)
You must be signed in to star a gist -
Fork
(22)
You must be signed in to fork a gist
-
-
Save rcugut/c7abd2a425bb65da3c61d8341cd4b02d to your computer and use it in GitHub Desktop.
Revisions
-
rcugut revised this gist
Jul 31, 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 @@ -1,4 +1,4 @@ ### DEPRECATED as of macOS 10.13 (High Sierra). See the new [GUIDE to install nvm and yarn for macOS (updated July 2019)](https://gist.github.com/rcugut/46904124d198a9dbd430abe88ebf849b) # Fixing npm On Mac OS X for Homebrew Users -
rcugut revised this gist
Jul 31, 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 @@ -1,4 +1,4 @@ ### DEPRECATED as of macOS 10.13 (High Sierra). See the new [GUIDE to install nvm and yarn for macOS (updated July 2019)] (https://gist.github.com/rcugut/46904124d198a9dbd430abe88ebf849b) # Fixing npm On Mac OS X for Homebrew Users -
rcugut revised this gist
Feb 4, 2019 . 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 @@ -1,3 +1,5 @@ ### DEPRECATED, see https://gist.github.com/rcugut/46904124d198a9dbd430abe88ebf849b # Fixing npm On Mac OS X for Homebrew Users Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document. -
rcugut revised this gist
Jul 13, 2017 . 1 changed file with 3 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 @@ -136,7 +136,9 @@ npm install -g npm That's it. You should now be able to run the `npm` command **without `sudo`**. ------------ **NEVER** run `npm` as sudo; so never do `sudo npm install ...` -
rcugut revised this gist
Jul 13, 2017 . 1 changed file with 25 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 @@ -107,6 +107,31 @@ prefix=/usr/local/npm_packages curl -L https://www.npmjs.com/install.sh | sh ``` **NOTE @ July 13 2017**: the install script from above (from npmjs.com) silently fails and doesn't copy the npm package contents correctly (see comments below from @hughsw). In order to (hack)fix this you can do the following **after** running the above npm install.sh script. The instructions below apply to `npm 5.2.0`, but may work for earlier or later 5.x releases: ```bash # manually download and un-targz into a local dir (it will be named `package`) curl -L https://registry.npmjs.org/npm/-/npm-5.2.0.tgz | tar xz # remove the broken npm symlink (generated by the nppmjs install.sh script) rm -rf /usr/local/npm_packages/lib/node_modules/npm # move the extracted `package` in the correct place and rename to `npm` mv package /usr/local/npm_packages/lib/node_modules/npm # that should do it. The bin/npm symlinks should now work # make sure it works, and update to latest available npm: npm install -g npm # if you reach this step, w/o any errors => ALL OK! ``` That's it. You should now be able to run the `npm` command **without `sudo`**. -
rcugut revised this gist
Feb 8, 2017 . 1 changed file with 1 addition and 4 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 @@ -35,10 +35,7 @@ brew install node --without-npm # install yarn (see yarnpkg.com for more info) brew install yarn # follow up with: https://yarnpkg.com/en/docs/install ``` -
rcugut revised this gist
Feb 8, 2017 . 1 changed file with 16 additions and 3 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 @@ -20,13 +20,26 @@ Run the following commands to remove all existing global npm modules, uninstall # this next line erases all the existing global npm packages rm -rf /usr/local/lib/node_modules # remove previously installed node brew uninstall node brew prune # clean all broken symlinks brew update # always good to have the latest # install node via brew, but without npm # there are 2 options: # - if you want to use `yarn` (yarnpkg.com), you need latest 'node' # - if you don't use `yarn` (yarnpkg.com), prefer LTS 'node@6' brew install node --without-npm # install yarn (see yarnpkg.com for more info) brew install yarn ## ``` You should now be able to run the `node` command -
rcugut revised this gist
Dec 5, 2016 . 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 @@ -26,7 +26,7 @@ brew prune # clean all broken symlinks brew update # always good to have the latest # install node 6.x (6.9.x is LTS since Oct 18 2016) brew install node@6 --without-npm ``` You should now be able to run the `node` command -
rcugut revised this gist
Nov 16, 2016 . 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 @@ -26,7 +26,7 @@ brew prune # clean all broken symlinks brew update # always good to have the latest # install node 6.x (6.9.x is LTS since Oct 18 2016) brew install node6-lts --without-npm ``` You should now be able to run the `node` command -
rcugut revised this gist
Oct 19, 2016 . 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 @@ -46,7 +46,7 @@ mkdir -p /usr/local/npm_packages # it means the permissions are wrong with your `/usr/local` folder, so fix it; # normally, with Homebrew, your user should own the entire `/usr/local` folder: sudo chown -R `whoami` /usr/local ``` -
rcugut revised this gist
Oct 19, 2016 . 1 changed file with 3 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 @@ -22,10 +22,11 @@ rm -rf /usr/local/lib/node_modules # reinstall node via brew, but without npm brew uninstall node brew prune # clean all broken symlinks brew update # always good to have the latest # install node 6.x (6.9.x is LTS since Oct 18 2016) brew install node --without-npm ``` You should now be able to run the `node` command -
rcugut revised this gist
May 13, 2016 . 1 changed file with 3 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 @@ -23,7 +23,9 @@ rm -rf /usr/local/lib/node_modules # reinstall node via brew, but without npm brew uninstall node brew update # always good to have the latest # install node4 LTS brew install node4-lts --without-npm ``` You should now be able to run the `node` command -
rcugut revised this gist
May 11, 2016 . 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 @@ -95,7 +95,7 @@ curl -L https://www.npmjs.com/install.sh | sh ``` That's it. You should now be able to run the `npm` command **without `sudo`**. # Extra notes -
rcugut revised this gist
May 11, 2016 . 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 @@ -50,7 +50,7 @@ sudo chown -R /usr/local #### Add/append the following lines in `~/.bashrc` ``` # this is the root folder where all globally installed node packages will go export NPM_PACKAGES="/usr/local/npm_packages" export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" # add to PATH -
rcugut revised this gist
May 11, 2016 . 1 changed file with 0 additions and 3 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 @@ -45,9 +45,6 @@ mkdir -p /usr/local/npm_packages sudo chown -R /usr/local ``` #### Add/append the following lines in `~/.bashrc` -
rcugut revised this gist
May 11, 2016 . 1 changed file with 11 additions and 4 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 @@ -36,11 +36,18 @@ You should now be able to run the `node` command ```bash # run the following commands mkdir -p /usr/local/npm_packages # ONLY IF THE COMMAND ABOVE FAILS >>> # it means the permissions are wrong with your `/usr/local` folder, so fix it; # normally, with Homebrew, your user should own the entire `/usr/local` folder: sudo chown -R /usr/local ``` #### Add/append the following lines in `~/.bashrc` -
rcugut revised this gist
May 11, 2016 . 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 @@ -17,12 +17,12 @@ Run the following commands to remove all existing global npm modules, uninstall ```bash # run the following commands # this next line erases all the existing global npm packages rm -rf /usr/local/lib/node_modules # reinstall node via brew, but without npm brew uninstall node brew update # always good to have the latest brew install node --without-npm ``` -
rcugut revised this gist
May 11, 2016 . 1 changed file with 3 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 @@ -15,6 +15,9 @@ Run the following commands to remove all existing global npm modules, uninstall ```bash # run the following commands # this next line erases all the existing global npm packages rm -rf /usr/local/lib/node_modules -
rcugut revised this gist
May 11, 2016 . 1 changed file with 3 additions and 3 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 @@ -27,17 +27,17 @@ You should now be able to run the `node` command ### 2. Prepare the npm new home: `/usr/local/npm_packages` ```bash # run the following commands sudo mkdir -p /usr/local/npm_packages # normally, with Homebrew, your user should own the entire `/usr/local` folder, but this is just to be safe: # make sure your user is allowed to write into the folder sudo chown -R /usr/local/npm_packages ``` #### Add/append the following lines in `~/.bashrc` -
rcugut renamed this gist
May 11, 2016 . 1 changed file with 80 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 @@ -10,21 +10,96 @@ Before you start, make a note of any globally installed npm packages. These inst Run the following commands to remove all existing global npm modules, uninstall node & npm, re-install node with the right defaults, install npm as its own pacakge, and configure the location for global npm modules to be installed. ### 1. Re-install node without npm ```bash # this next line erases all the existing global npm packages rm -rf /usr/local/lib/node_modules # reinstall node via brew, but without npm brew uninstall node brew install node --without-npm ``` You should now be able to run the `node` command ### 2. Prepare the npm new home: `/ust/local/npm_packages` ```bash # run the following commands sudo mkdir -p /ust/local/npm_packages # normally, with Homebrew, your user should own the entire `/usr/local` folder, but this is just to be safe: # make sure your user is allowed to write into the folder sudo chown -R /ust/local/npm_packages ``` #### Add/append the following lines in `~/.bashrc` ``` # this is where all globally installed node packages will go export NPM_PACKAGES="/usr/local/npm_packages" export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" # add to PATH export PATH="$NPM_PACKAGES/bin:$PATH" ``` #### And make sure you load the `.bashrc` in your `.bash_profile`: - **IMPORTANT:** make sure you do not have both a `.profile` and a `.bash_profile`; if you do, copy everything from `.profile` into `.bash_profile` and then remove the `.profile` - Check if the following or similar line exists in your `.bash_profile`: ``` [[ -s ~/.bashrc ]] && source ~/.bashrc ``` - make sure `.bashrc` is executable ```bash # run the following commands chmod +x ~/.bashrc ``` ### 3. Restart your iTerm / Terminal **IMPORTANT:** close all existing iTerm/Terminal sessions and re-open iTerm/Terminal before going further Advanced: or just reload the `.bash_profile` -- `source ~/.bash_profile` ### 3. Install npm from npmjs.com #### First, set the correct npm home in `~/.npmrc` Make sure `~/.npmrc` file exists, and contains a line as below: ``` prefix=/usr/local/npm_packages ``` #### Run the npm install script from npmjs.com ```bash curl -L https://www.npmjs.com/install.sh | sh ``` That's it. You should now be able to run the `npm` command. # Extra notes ------------ **NEVER** run `npm` as sudo; so never do `sudo npm install ...` ------------ ---------- ## Explanation of the issue -
rcugut revised this gist
May 9, 2016 . 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 @@ -21,7 +21,7 @@ curl -L https://www.npmjs.com/install.sh | sh Node and npm should be correctly installed at this point. The final step is to add `~/.node/bin` to your `PATH` so commands you install globally are usable. I added this line to my `~/.path` script, which gets run via `~/.bash_profile`. ```bash export PATH="$HOME/.npm-packages/bin:$PATH" ``` Now you can re-install any global npm packages you need without any problems. -
DanHerbert revised this gist
Feb 13, 2016 . 1 changed file with 25 additions and 28 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 @@ -1,6 +1,30 @@ # Fixing npm On Mac OS X for Homebrew Users Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document. ## Solution This solution fixes the error caused by trying to run `npm update npm -g`. Once you're finished, you also won't need to use `sudo` to install npm modules globally. Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them. Run the following commands to remove all existing global npm modules, uninstall node & npm, re-install node with the right defaults, install npm as its own pacakge, and configure the location for global npm modules to be installed. ```bash rm -rf /usr/local/lib/node_modules brew uninstall node brew install node --without-npm echo prefix=~/.npm-packages >> ~/.npmrc curl -L https://www.npmjs.com/install.sh | sh ``` Node and npm should be correctly installed at this point. The final step is to add `~/.node/bin` to your `PATH` so commands you install globally are usable. I added this line to my `~/.path` script, which gets run via `~/.bash_profile`. ```bash export PATH="$HOME/.node/bin:$PATH" ``` Now you can re-install any global npm packages you need without any problems. ## Explanation of the issue @@ -40,30 +64,3 @@ There's an [NPM bug for this exact problem](https://github.com/npm/npm/issues/37 Also, using the Homebrew installation of `npm` will require you to use `sudo` when installing global packages. Since one of the core ideas behind Homebrew is that apps can be installed without giving them root access, this is a bad idea. -
DanHerbert revised this gist
Apr 18, 2015 . 1 changed file with 9 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 @@ -4,7 +4,7 @@ If you just want to fix the issue quickly, scroll down to the "solution" section ## Explanation of the issue If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do `npm update npm -g`, you may see an error like this: ``` $ npm update npm -g @@ -36,20 +36,24 @@ npm ERR! not ok code 0 ``` There's an [NPM bug for this exact problem](https://github.com/npm/npm/issues/3794). The bug has been "fixed" by Homebrew installing npm in a way that allows it to manage itself once the install is complete. However, this is error-prone and still seems to cause problems for some people. The root of the the issue is really that `npm` is its own package manager and it is therefore better to have `npm` manage itself and its packages completely on its own instead of letting Homebrew do it. Also, using the Homebrew installation of `npm` will require you to use `sudo` when installing global packages. Since one of the core ideas behind Homebrew is that apps can be installed without giving them root access, this is a bad idea. ## Solution This solution fixes the error caused by trying to run `npm update npm -g`. Once you're finished, you also won't need to use `sudo` to install npm modules globally. Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them. Run the following commands to remove all existing global npm modules, uninstall node & npm, re-install node with the right defaults, install npm as its own pacakge, and configure the location for global npm modules to be installed. ```bash rm -rf /usr/local/lib/node_modules brew uninstall node brew install node --without-npm echo prefix=~/.node >> ~/.npmrc curl -L https://www.npmjs.com/install.sh | sh ``` Node and npm should be correctly installed at this point. The final step is to add `~/.node/bin` to your `PATH` so commands you install globally are usable. I added this line to my `~/.path` script, which gets run via `~/.bash_profile`. @@ -58,8 +62,8 @@ Node and npm should be correctly installed at this point. The final step is to a export PATH="$HOME/.node/bin:$PATH" ``` Now you can re-install any global packages with the command below, replacing the npm modules with whatever global packages you need. ```bash npm install -g http-server node-inspector forever nodemon ``` -
DanHerbert revised this gist
Aug 5, 2014 . 1 changed file with 2 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 @@ -4,7 +4,7 @@ If you just want to fix the issue quickly, scroll down to the "solution" section ## Explanation of the issue If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do `npm update npm -g`, you will see an error like this: ``` $ npm update npm -g @@ -52,7 +52,7 @@ echo prefix=~/.node >> ~/.npmrc curl -L https://www.npmjs.org/install.sh | sh ``` Node and npm should be correctly installed at this point. The final step is to add `~/.node/bin` to your `PATH` so commands you install globally are usable. I added this line to my `~/.path` script, which gets run via `~/.bash_profile`. ```bash export PATH="$HOME/.node/bin:$PATH" -
DanHerbert revised this gist
Mar 23, 2014 . 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 @@ -61,5 +61,5 @@ export PATH="$HOME/.node/bin:$PATH" You'll need to re-install your global node modules again. As an example, a few I use are: ```bash npm install -g grunt-cli http-server uglify-js jshint yo node-inspector forever nodemon ``` -
DanHerbert revised this gist
Mar 13, 2014 . 1 changed file with 4 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 @@ -1,5 +1,7 @@ # Fixing npm On Mac OS X for Homebrew Users If you just want to fix the issue quickly, scroll down to the "solution" section below. ## Explanation of the issue If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew try to do `npm update npm -g`, you will see error like this: @@ -56,8 +58,8 @@ Node and npm should be correctly installed at this point. The final step is to a export PATH="$HOME/.node/bin:$PATH" ``` You'll need to re-install your global node modules again. As an example, a few I use are: ```bash npm install -g grunt-cli http-server uglify-js jshint yo nodemon ``` -
DanHerbert revised this gist
Mar 13, 2014 . 1 changed file with 2 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 @@ -40,15 +40,10 @@ There's an [NPM bug open for this exact problem](https://github.com/npm/npm/issu This solution fixes the error caused by trying to run `npm update npm -g`. Once you're finished, you also won't need to use `sudo` to install npm modules globally. Run the following commands to remove all existing global npm modules, uninstall node & npm, re-install node with the right defaults, install npm as its own pacakge, and configure the location for global npm modules to be installed. ```bash rm -rf /usr/local/lib/node_modules brew uninstall node brew install node --without-npm echo prefix=~/.node >> ~/.npmrc -
DanHerbert revised this gist
Mar 13, 2014 . 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 @@ -55,7 +55,7 @@ echo prefix=~/.node >> ~/.npmrc curl -L https://www.npmjs.org/install.sh | sh ``` Node and npm should be correctly installed at this point. The final step is to add `~/.node/bin` to your `PATH` so commands you install globally are usable. I added this line to my `~/.path` script, which gets called via `~/.bash_profile`. If you want to see a full example you can check out [my dotfiles repo on github](https://github.com/DanHerbert/dotfiles). ```bash export PATH="$HOME/.node/bin:$PATH" -
DanHerbert revised this gist
Mar 13, 2014 . 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 @@ -55,7 +55,7 @@ echo prefix=~/.node >> ~/.npmrc curl -L https://www.npmjs.org/install.sh | sh ``` Node and npm should be correctly installed at this point. The final step is to add `~/.node/bin` to your `PATH` so commands you install globally are usable. I added this line to my `~/.path`, which gets called via `~/.bash_profile`. If you want to see a full example you can check out [my dotfiles repo on github](https://github.com/DanHerbert/dotfiles). ```bash export PATH="$HOME/.node/bin:$PATH" -
DanHerbert revised this gist
Mar 13, 2014 . 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 @@ -1,4 +1,5 @@ # Fixing npm On Mac OS X for Homebrew Users ## Explanation of the issue If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew try to do `npm update npm -g`, you will see error like this:
NewerOlder