Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ob run on OS X #298

Closed
fabianpage opened this issue Nov 3, 2018 · 7 comments
Closed

ob run on OS X #298

fabianpage opened this issue Nov 3, 2018 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@fabianpage
Copy link

Hi

I installed obelisk and created a new project with ob init. On ob run i got the following error:
(OS X 10.14, nix --version: 2.1.3) Can somebody give me a hint what's wrong?

    ʎ ob run
    Loading ghci -Wall -ignore-dot-ghci -fwarn-redundant-constraints -ghci-script /private/var/folders/t6/hwn93hhs2_s7w8d4v5450j000000gn/T/ob-ghci-e24c9db219549827/.ghci ...
    GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help
    [1 of 4] Compiling Common.Api       ( common/src/Common/Api.hs, interpreted )
    [2 of 4] Compiling Common.Route     ( common/src/Common/Route.hs, interpreted )
    
    common/src/Common/Route.hs:24:1: error:
        Could not find module ‘Obelisk.Route’
        Use -v to see a list of the files searched for.
       |
    24 | import Obelisk.Route
       | ^^^^^^^^^^^^^^^^^^^^
    
    common/src/Common/Route.hs:25:1: error:
        Could not find module ‘Obelisk.Route.TH’
        Use -v to see a list of the files searched for.
       |
    25 | import Obelisk.Route.TH
       | ^^^^^^^^^^^^^^^^^^^^^^^
    Failed, one module loaded.
    
    <no location info>: error:
        Could not find module ‘Obelisk.Run’
        It is not a module in the current program, or in any known package.
    
    <no location info>: error:
        Could not find module ‘Frontend’
        It is not a module in the current program, or in any known package.
    
    <no location info>: error:
        Could not find module ‘Backend’
        It is not a module in the current program, or in any known package.
    Loaded GHCi configuration from /private/var/folders/t6/hwn93hhs2_s7w8d4v5450j000000gn/T/ob-ghci-e24c9db219549827/.ghci
    
    common/src/Common/Route.hs:24:1: error:
        Could not find module ‘Obelisk.Route’
        Use -v to see a list of the files searched for.
       |
    24 | import Obelisk.Route
       | ^^^^^^^^^^^^^^^^^^^^
    common/src/Common/Route.hs:25:1: error:
        Could not find module ‘Obelisk.Route.TH’
        Use -v to see a list of the files searched for.
       |
    25 | import Obelisk.Route.TH
       | ^^^^^^^^^^^^^^^^^^^^^^^
@EvanMisshula
Copy link

+1 . same issue

@EvanMisshula
Copy link

Check that brew doctor says that your system is in good shape. My /usr/local/sbin was not linked. For me what worked was deleting Nix as per NixOS/nix#1402. Pay special attention to deleting any reference to Nix in ~/.profile or ~/.bash_profile. Additionally I deleted /etc/nix/ and also deleted ghc, cabal2nix, cabal-install and haskell-stack. After I installed Nix via https://github.com/Gabriel439/haskell-nix and cabal2nix, cabal-install and nix-prefetch-git. Next I followed the directions to install Obelisk including modifying /etc/nix/nix.conf. I was then able able to create a new obtest directory. Running $ ob init and $ ob run in that directory proceeded without error. My environment is (Mojave 10.14.1, nix 2.1.3, cabal-install 2.4.0.0 and cabal2nix 2.11.1) @ryantrinkle , I believe this issue can now be closed.

@dalaing
Copy link
Collaborator

dalaing commented Nov 30, 2018

I'm getting this exact error in NixOS, when I do ob init and then ob run in a new directory.

@dalaing
Copy link
Collaborator

dalaing commented Nov 30, 2018

... and after a NixOS update and a garbage collection it has gone away.

@luigy
Copy link
Collaborator

luigy commented Nov 30, 2018

@dalaing would you happen to have a way to repro it? could this have been triggered by a system update ?

@luigy luigy added the help wanted Extra attention is needed label Dec 20, 2018
@ali-abrar
Copy link
Member

I can't reproduce this on macOS Mojave 10.14.3. Please reopen if you're still having difficulty after updating obelisk.

@pkaterski
Copy link

Check that brew doctor says that your system is in good shape. My /usr/local/sbin was not linked. For me what worked was deleting Nix as per NixOS/nix#1402. Pay special attention to deleting any reference to Nix in ~/.profile or ~/.bash_profile. Additionally I deleted /etc/nix/ and also deleted ghc, cabal2nix, cabal-install and haskell-stack. After I installed Nix via https://github.com/Gabriel439/haskell-nix and cabal2nix, cabal-install and nix-prefetch-git. Next I followed the directions to install Obelisk including modifying /etc/nix/nix.conf. I was then able able to create a new obtest directory. Running $ ob init and $ ob run in that directory proceeded without error. My environment is (Mojave 10.14.1, nix 2.1.3, cabal-install 2.4.0.0 and cabal2nix 2.11.1) @ryantrinkle , I believe this issue can now be closed.

Had the same problem. This also fixed it on Catalina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants