node.js install broken #15315

natevw opened this Issue Oct 5, 2012 · 7 comments


None yet

6 participants

natevw commented Oct 5, 2012

Brew fails to link when installing node v0.8.11:

Warning: Could not link node. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link node'

Following this workaround (i.e. deleting an npm folder from the Cellar) let it link, but earlier versions of the formula simply worked. Did something change with respect to npm again?

natevw commented Oct 5, 2012

For whatever reason I did not get the NpmNotInstalled dependency message. A better workaround for getting node installed (assuming you've already broken node/npm by attempting the upgrade before knowing to npm uninstall npm -g first) is to rm -rf /usr/local/lib/node_modules/npm — removing the standalone self-hosted npm package so that brew can symlink it from Cellar instead.

adamv commented Oct 24, 2012

Other maintainers: do we need to change the messaging here?


@adamv We should investigate why it didn't halt the build, as it should since that's a fatal dependency.


What @mistydemeo said.

adamv commented Nov 26, 2012

I don't understand what this check is doing:

  def satisfied?
      path ="#{modules_folder}/npm")
      not path.realpath.to_s.include?(HOMEBREW_CELLAR)
    rescue Exception => e

Checking if the npm path string includes the cellar path?


I think so. Which would be the wrong thing to do, because if it came from external npm it wouldn't resolve into the cellar.

@AtnNn AtnNn added a commit to AtnNn/homebrew that referenced this issue Jan 31, 2013
@AtnNn AtnNn Fix the test for external npm (#15315) 4022bed
AtnNn commented Jan 31, 2013

If the npm path includes the cellar path, an external npm is not installed and the test should return true.

@adamv adamv closed this in 69efc21 Jan 31, 2013
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.