macOS install via brew: says it succeeds but server won't run

Hi Community,

Have installed 4.5.1 and 4.5.2 on a macOS 10.10.5 machine via brew. The first time I tried 4.5.1 it had some errors because I had node already installed, but finished, subsequent builds look pretty “all good”, like this:

server:Cellar svradmin$ brew install grafana
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

==> Downloading
Already downloaded: /Users/svradmin/Library/Caches/Homebrew/grafana-4.5.2.tar.gz
==> go run build.go build
==> yarn install --ignore-engines
==> node_modules/grunt-cli/bin/grunt build --force
==> Caveats
To have launchd start grafana now and restart at login:
  brew services start grafana
Or, if you don't want/need a background service you can just run:
  grafana-server --config=/usr/local/etc/grafana/grafana.ini --homepath /usr/local/share/grafana cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins
==> Summary
🍺  /usr/local/Cellar/grafana/4.5.2: 5,769 files, 139.7MB, built in 4 minutes 42 seconds

However, you run it and …

EROR[09-28|13:47:11] Failed to detect generated css or javascript files in static root (/usr/local/share/grafana/public), have you executed default grunt task? logger=server

Googling the error finds issue 7805, but (as some other google hits have pointed out), it’s difficult to run a default grunt task when you have no idea which folder contains the right gruntfile - and in fact there doesn’t appear to be a suitable-looking gruntfile in the whole (presumed) brew install directory , i.e. /usr/local/Cellar/grafana/4.5.2/

Somehow yesterday with 4.5.1 and trying some of the suggested npm installs, I did get the server to start and run, but the css was missing (which somewhat defeats the purpose of grafana).

I will probably switch now to building from source, but I thought I’d ask/report this.

Maybe 10.10 is too old now and nobody tested it, there’s no reason I can’t update that server other than “if it aint broke…”

strange, will investigate

Maybe homebrew does not do binary builds for MacOS Yosemite. When I do brew install grafana it downloads a prebuilt bottle for sierra, looks like that does not happen for you and homebrew tries to build it from source which fails

Interesting. Install from source worked and was pretty painless (it probably helped that the brew install had brought down all the dependencies).

The part around the yarn install produced a lot more output, so I’m guessing the failure was in there somewhere. I did get as far as figuring out it was not aliasing a lot of things into /usr/local/bin, but now grafana’s working I’ll be far too distracted by pretty graphs to ever think about this again!

(Just revisiting this because I decided it was finally time to update Grafana on my 10.10 machine and the no-css issue still exists - I read most of this post before realising it was me :wink: - I guess I should also report this to the homebrew guys - macOS 10.10 is not working. This time I worked around things by taking the css files from my hand-built 4.x into the 5.x public/css folder. At least things are more or less viewable now. I have a homebrew build on a 10.13 VM and I think I’ll take the css from that)

Scratch that, homebrew is quite explicit that 10.10 is not supported when it fails to update node - it didn’t even get that far on the first build (but didn’t actually error out very obviously). So, I’ll have to update my “server” it seems, and hope I don’t lose any other functionality I like.