node.js install broken #15315

Closed
natevw opened this Issue Oct 5, 2012 · 7 comments

Projects

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.

Contributor
adamv commented Oct 24, 2012

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

Contributor

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

Owner

What @mistydemeo said.

Contributor
adamv commented Nov 26, 2012

I don't understand what this check is doing:

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

Checking if the npm path string includes the cellar path?

Contributor

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
Contributor
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.