3

Im trying to install node + npm using brew and keep getting the following:

$brew install node Warning: node-0.10.33_1 already installed, it's just not linked

Any ideas whats going on and how to fix?

4
  • What happens when you run brew link node? Could be a permissions issue.
    – James M
    Dec 17, 2014 at 1:18
  • Getting this: ⚙  ~  brew link node Linking /usr/local/Cellar/node/0.10.33_1... Error: Could not symlink include/node/ares.h /usr/local/include/node is not writable.
    – rahul2001
    Dec 17, 2014 at 1:45
  • You need to fix your permissions. Run brew doctor.
    – James M
    Dec 17, 2014 at 2:13
  • I uninstalled and reinstalled node but npm is nott installing
    – rahul2001
    Dec 17, 2014 at 2:16

3 Answers 3

2

Try brew doctor that should give you some idea of what the problem is. Also, I strongly recommend not installing node directly using brew, but actually installing nvm through (brew install nvm)

nvm is the node version manager, which allows you to install different versions of node, and quickly swap between them.

1
  • nvm notes that you shouldn't use brew to install it on the docs.
    – Winnemucca
    Jun 9, 2017 at 12:12
1

I have the same problem.

but I try lots method (e.g. nvm, uninstall, brew doctor, blabla...), and decide use http://nodejs.org/ pkg instead.

it would install perfectly without homebrew.

but if you are so likely use homebrew, I have no idea about this.

0

I had this problem as well. It was due to part of a leftover installation from running and using the pkg installer from nodejs.org. Simply:

brew uninstall node
rm -rf /usr/local/include/node
brew install node

And you're good to go. You could probably get away with skipping the uninstall and just performing a brew link node, but I didn't try that.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.