Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

node.js install broken #15315

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

node.js install broken #15315

natevw opened this issue Oct 5, 2012 · 7 comments

Comments

@natevw
Copy link

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
Copy link
Author

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
Copy link
Contributor

adamv commented Oct 24, 2012

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

@mistydemeo
Copy link
Member

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

@MikeMcQuaid
Copy link
Member

What @mistydemeo said.

@adamv
Copy link
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?

@jacknagel
Copy link
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 pushed a commit to AtnNn/homebrew that referenced this issue Jan 31, 2013
@AtnNn
Copy link
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 as completed in 69efc21 Jan 31, 2013
@Homebrew Homebrew 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.
Projects
None yet
Development

No branches or pull requests

6 participants