Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

node.js install broken #15315

Closed
natevw opened this Issue · 7 comments

6 participants

@natevw

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

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
Owner

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

@mistydemeo
Owner

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

@mikemcquaid
Owner

What @mistydemeo said.

@adamv
Owner

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
Owner

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 referenced this issue from a commit in AtnNn/homebrew
@AtnNn AtnNn Fix the test for external npm (#15315) 4022bed
@AtnNn

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

@adamv adamv closed this issue from a commit
@AtnNn AtnNn node: fix test for external npm
Closes #15315.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
69efc21
@adamv adamv closed this in 69efc21
@dholm dholm referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@fgeller fgeller referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@n1k0 n1k0 referenced this issue from a commit
@AtnNn AtnNn node: fix test for external npm
Closes #15315.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
da6b925
@cooljeanius cooljeanius referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@erbmicha erbmicha referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@phatblat phatblat referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.