obelisk icon indicating copy to clipboard operation
obelisk copied to clipboard

ob run not working for macOS 12.0.1

Open dbarkleyjr opened this issue 2 years ago • 8 comments

I followed the installation instructions exactly and when I go to run ob run after ob init I get:

ob: dieVerbatim: user error (ob: Cannot find the program 'ghc'. User-specified path
'/Users/dbarkleyjr/Projects/reflex' does not refer to an
executable and the program is not on the system path.
)

I'm on macOS 12.0.1. I didn't see anything about explicitly installing ghc.

dbarkleyjr avatar Jan 31 '22 01:01 dbarkleyjr

Hi @dbarkleyjr, I am having the same issue. Were you able to find a solution?

dustinnorwood avatar Feb 19 '22 15:02 dustinnorwood

Hi @dbarkleyjr, I am having the same issue. Were you able to find a solution?

Nope. I decided to just use purescript for my frontend. Much less friction setting it up

dbarkleyjr avatar Feb 19 '22 18:02 dbarkleyjr

This error happens when you use zsh instead of bash. The nixpkgs was not set (nix-channel --add https://nixos.org/channels/nixpkgs-21.11-darwin nixpkgs" and you will need to set it up the NIX_PATH env var yourself "export NIX_PATH=path_to_nix_channel". You can also try "nix-shell -p 'bash'" and run again "ob run". We will be working on this carefully.

Thank you!

romefeller avatar May 16 '22 17:05 romefeller

We need to either document the need for a channel and env var set up, or make the installation easier.

madeline-os avatar May 16 '22 17:05 madeline-os

I'm using bash and facing the same issue...

$ nix-env --version
nix-env (Nix) 2.8.1
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.0.2
$ ob run
./.obelisk/impl: command not cached, building ...
Tip: Press Ctrl+e to display full output
✔ Built on ./.obelisk/impl [command]
ob: dieVerbatim: user error (ob: Cannot find the program 'ghc'. User-specified path
'/path/for/my/project' does not refer to an
executable and the program is not on the system path.
)
$ 

coelhomarcio avatar May 17 '22 19:05 coelhomarcio

Is your NIX_PATH empty? "printenv NIX_PATH" to check.

romefeller avatar May 17 '22 21:05 romefeller

Is your NIX_PATH empty? "printenv NIX_PATH" to check.

I read somewhere that on non NixOs, the NIX_PATH doesn't get set anymore. But it worked after I add/update nix-channel and export the NIX_PATH env var. And yes, my NIX_PATH was empty. Thanks for your help!

coelhomarcio avatar May 18 '22 08:05 coelhomarcio

The solution to this issue will need to remove all dependencies on NIX_PATH that obelisk may have in non-nixos environments.

madeline-os avatar May 18 '22 13:05 madeline-os