4

As $title says, I want to install io.js with brew on Yosemite. In my system there is no need for Node.js, and I want to avoid unnecessary programs.

But.. When I run brew install iojs I see it will be built with --without-npm option, and as the post-install text clarifies, it needs a patched npm.

Although I searched for the solution, the only thing that came across is how to run io.js and Node.js side-by-side, and that's not what I'm looking for.

I see there is an npm package for brew, but it's part of the node package.

How can I install iojs+npm without node?

0

3 Answers 3

3
  1. Install nvm (node version manager) using brew:

    brew update
    brew install nvm
    source $(brew --prefix nvm)/nvm.sh
    

    Add the last command to the .profile, .bashrc or .zshrc file to not run it again on every terminal start. So for example to add it to the .profile run:

    echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.profile
    
  2. Using nvm you can install any version of node or io.js you want. So to install the latest version of iojs do:

    nvm install iojs
    

npm is shipping with iojs so you don't need to install it manually.

Related question: What is the suggested way to install brew, node.js, io.js, nvm, npm on OS X?

Sign up to request clarification or add additional context in comments.

1 Comment

nvm is an other thing I want to avoid. brew is fully capable to get and update the latest version of iojs. I don't want to maintain, manually update and then configure to be the default version of iojs. it's just a plus abstraction level for me, nothing else.
1

I've had the same problem: homebrew doesn't seem to properly explain how to get that "patched" npm in a clean way.

Anyway, nothing has worked for me better than getting that pkg from iojs.org, which includes npm.

(I'm referring to iojs v2.0.0)

Comments

1

It might be late but you can just use brew unlink node && brew link iojs --force I avoided nvm because it was way too slow for me

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.