brew create traceur compiler and npm install -g

228 views Asked by At

I'm trying to create a homebrew formula that requires some npm modules to be installed.

I see that npm is handled by brew and external dependency so I want to download traceur-compiler and then build it.

My formula goes like this:

class Traceur < Formula
  homepage "https://github.com/google/traceur-compiler"
  url "..."
  sha1 "..."
  version "1.0.0"

  # depends_on :node

  def install
    system "./configure",
                        "--disable-debug",
                          "--disable-dependency-tracking",
                          "--disable-silent-rules",
                          "--prefix=#{prefix}"

    system "npm install -g"
    system "make"
  end

  test do
    system "false"
  end
end

I've downloaded the repo into the cache and set the SHA1 so it runs but it fails:

==> npm install -g
2014-11-26 15:49:30 +1100

npm install -g


READ THIS: http://git.io/brew-troubleshooting

Is it possible to install npm packages globally with homebrew?

1

There are 1 answers