Skip to content

Instantly share code, notes, and snippets.

@DenisIzmaylov
Last active September 12, 2016 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DenisIzmaylov/9b15f98c579bb44d80a2 to your computer and use it in GitHub Desktop.
Save DenisIzmaylov/9b15f98c579bb44d80a2 to your computer and use it in GitHub Desktop.
How to update io.js to Node 4 and npm 3

How to update io.js to Node 4 and npm 3

The recipe described below works fine in OS X El Capitan and Homebrew tool.

Fine tested with node@4.1 and npm@3.3.4.

io.js -> Node.js 4

brew unlink iojs
brew uninstall iojs
brew unlink node
brew uninstall node
brew update
brew install node

npm 2.x -> npm 3.x

cd /usr/local/lib/node_modules/npm
npm install npm
@scheung38
Copy link

cd /usr/local/lib/node_modules/npm
$ npm install npm
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "npm"
npm ERR! node v4.5.0
npm ERR! npm v3.10.3
npm ERR! code ENOSELF

npm ERR! Refusing to install npm as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/lib/node_modules/npm/npm-debug.log
holbmac0132:npm sebastien.cheung$ npm install npm
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "npm"
npm ERR! node v4.5.0
npm ERR! npm v3.10.3
npm ERR! code ENOSELF

npm ERR! Refusing to install npm as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/lib/node_modules/npm/npm-debug.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment