In case your problem cannot be solved with the steps on this page, join our Slack community. We’re happy to help!
Auto Troubleshooting
Run this to automatically check for the most common IHP issues:Common Issues
Makefile:7: /../lib/IHP/Makefile.dist: No such file or directory
Solution: Fix the missing link
Solution: Fix the missing link
Problem:Somehow the project was not correctly linked with IHP and now the project Makefile is unable to access some IHP files it needs.Solution:Run this command to fix the missing link:If this is not working: Please run ZSH Users (default on macOS)Other shells: take a look at the direnv documentation.After that restart your terminal. Then run the following command again to fix the missing link:Now, this should succeed.
which RunDevServer. If this returns RunDevServer not found, this indicates that direnv (which has been installed by ihp-new) is not loading the .envrc file of your shell.To solve this, run the following commands:Bash UsersRunning ihp-new builds a lot of Haskell packages and takes hours to complete
Solution: Fix binary cache
Solution: Fix binary cache
Problem:When you try to start a new IHP project by running
ihp-new someproject, nix seems to start compiling a lot of Haskell packages with GHC.Solution:This is most likely caused by a change we did to our binary cache. Run cachix use digitallyinduced to fix this.warning: substituter ‘https://digitallyinduced.cachix.org’ does not have a valid signature for path …
Solution: Update nix.conf
Solution: Update nix.conf
Problem:When running
ihp-new someproject to create a new project, nix seems to not use the binary cache with the above warning. Instead, it tries to build all the packages itself, which takes hours.Solution:This is caused by a change we did to our binary cache. Open ~/.config/nix/nix.conf. There take a look at the trusted-public-keys = property. You should have two entries there (the public key of our old binary cache, and the new one). Remove the old one digitallyinduced.cachix.org-1:3mGU1b6u5obFp2VUfI55Xe8/+mawl7y9Eztu3rb94PI= (should be first of the two digitallyinduced keys). Then save the file and the problem is fixed.error: file ‘/build/db/.s.PGSQL.5432’ has an unsupported type
Solution: Stop Postgres processes
Solution: Stop Postgres processes
Problem:When you try to start a Solution:This happens because nix cannot use the Postgres Unix socket which is in
nix-shell, an error like this happens:build/db. Usually, this happens when the development server of IHP is still running. Stop your IHP development server and then try again.When the development server is not running, check that you have no Postgres processes belonging to this Unix socket running anymore. In case there are no more processes running, try to remove the file via rm -f.Unbound implicit parameter (?modelContext::ModelContext)
Solution: Add implicit parameter to type signature
Solution: Add implicit parameter to type signature
The full error message looks like this:Problem:IHP uses an implicit parameter called
?modelContext to pass around the database connection. The ? question mark is part of the variable name. When you do a database query from a helper function outside of your controller actions the database connection needs to be passed to your function. This works automatically because it’s an implicit parameter but needs to be specified inside your type signature.Solution:Add (?modelContext :: ModelContext) => to the start of your type signature.Creating a new IHP project with ihp-new yields git error
Solution: Clear nix cache
Solution: Clear nix cache
When you followed the steps as described on the getting started page (i.e. installing Nix and IHP) but one of the steps erred during installation (e.g. connection issues, privileges not set correctly) the cache utilized by nix might not be properly initialized. This can manifest itself as a git error (output below) when running If you have a “fresh” nix install, this can be solved by removing your After removing your nix cache, running
ihp-new <project-name>.~/.cache/nix directory completely.ihp-new <project-name> will remain silent for a while since it will re-cache a substantial number of nix dependencies.Ubuntu on Windows Subsystem for Linux (WSL): ghc-pkg: Couldn't open database...
Solution: Switch to WSL 2
Solution: Switch to WSL 2
Problem:When you run Solution:Switch to WSL 2.
ihp-new blog to create a new project on a system using Ubuntu running on Windows Subsystem for Linux 1, you get an error like:Slow Compilation of Generated Types
Solution: Disable relation support
Solution: Disable relation support
Problem:Your project has a large database schema and This applies to both the dev shell and production builds.Alternatively, set the environment variable manually:See Relationships: Disabling Relation Support for Faster Compilation for details on what changes and what stops working.
Generated.Types takes a long time to compile. This is especially noticeable when the schema has many tables with foreign key relationships.Cause:For each foreign key relationship, IHP generates type parameters on record types, QueryBuilder fields for has-many relationships, Include type family instances, and complex UpdateField instances. These are expensive for GHC’s type checker, and the cost grows with the number of tables and relationships.Solution:If your project does not use fetchRelated or Include types, you can disable this machinery to speed up compilation. Set ihp.relationSupport = false; in your flake.nix:OAuth/HTTPS in Docker fails: certificate has unknown CA
Solution: Include CA certificates in Docker image
Solution: Include CA certificates in Docker image
Problem:Inside a container built with Nix This can affect Google OAuth, GitHub API calls, S3 uploads, etc.Cause:Minimal images produced by
dockerTools.buildImage, HTTPS requests fail with:dockerTools.buildImage do not include a root CA bundle at /etc/ssl/certs by default, and SSL libraries cannot validate certificates.Solution:Override the IHP Docker image to include CA certificates and set SSL env vars. See the detailed snippet and explanation in Deployment → Deploying with Docker → “TLS certificates in Nix-built Docker images”.