0

I'm trying to use a Heroku Postgres database on my Yesod application in a c9 workspace, but the following error message appears when the stack build command is running:

 $ stack build
    projeto-0.0.0: build (lib + exe)
    Preprocessing library projeto-0.0.0...
    [ 9 of 15] Compiling Handler.Cliente  ( src/Handler/Cliente.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Cliente.o )

    /home/ubuntu/workspace/projeto/src/Handler/Cliente.hs:11:1: error:
        Failed to load interface for ‘Database.Persist.Postgresql’
        Use -v to see a list of the files searched for.

    --  While building package projeto-0.0.0 using:
          /home/ubuntu/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0 build lib:projeto exe:projeto --ghc-options " -ddump-hi -ddump-to-file"
        Process exited with code: ExitFailure 1

What I should do?

icc97
  • 11,395
  • 8
  • 76
  • 90
Flavia
  • 41
  • 3
  • 4
    Make sure that you have listed `persistent-postgresql` in your cabal ( or package.yaml file) – Sibi Dec 03 '17 at 20:00
  • Have you looked through the more general "failed to load interface" question?: https://stackoverflow.com/questions/20446802/failed-to-load-interface-error-when-loading-compiled-modules-in-ghci – icc97 Dec 04 '17 at 10:16
  • This seems very similar to the previous question that you asked on here: https://stackoverflow.com/q/47291657/327074 – icc97 Dec 04 '17 at 10:17
  • I fixed the error installing cabal dependences: cabal install --only-dependencies – Flavia Dec 06 '17 at 19:13

0 Answers0