- 1 year ago
Stack build hangs on GHC-8.6.4/Cabal-2.4.1.0 on Windows
If stack build
hangs on GHC-8.6.4/Cabal-2.4.1.0 on Windows, it could be due to various reasons. Here are a few possible solutions you can try:
Check your internet connection: Ensure that you have a stable internet connection. Slow or intermittent internet can cause
stack build
to hang during package downloading.Update
stack
: Make sure you have the latest version ofstack
installed. You can updatestack
by runningstack upgrade
in your command prompt or terminal.Clear the package cache: If the package cache is corrupted or contains outdated information, it can cause issues with
stack build
. You can try clearing the package cache by runningstack clean --full
to remove all downloaded package files.Disable Windows Defender or other antivirus software: Antivirus software, including Windows Defender, can sometimes interfere with the build process. Temporarily disabling the antivirus software or adding exceptions for the relevant directories may help resolve the issue.
Increase resource limits: In some cases, the build process may require more resources than what is currently allocated. You can try increasing the resource limits for stack by setting the
STACK_YAML
environment variable to a larger value. For example,set STACK_YAML=32MB
will set the memory limit to 32MB.Check for firewall or proxy issues: If you are behind a firewall or using a proxy server, ensure that it is properly configured to allow the necessary network traffic for
stack
and the build process.
If none of these solutions work, you may need to provide more specific information about the error message or behavior you are experiencing in order to troubleshoot further.