Troubleshooting
Recipe Not Found
Section titled “Recipe Not Found”error: Recipe 'foo' not foundRun 'jake --list' to see available recipes.Causes:
- Typo in recipe name
- Jakefile not in current directory
- Recipe is hidden (prefixed with
_or has@hidden)
Solutions:
- Check spelling - Jake suggests similar names if you’re close
- Use
jake --listto see available recipes - Use
jake --allto see hidden recipes too - Use
-fto specify Jakefile path:jake -f path/to/Jakefile
Cyclic Dependency
Section titled “Cyclic Dependency”error: Cyclic dependency detected in 'foo'Cause: Recipes depend on each other in a loop:
# Wrong!task a: [b]task b: [a]Solution: Break the cycle by restructuring dependencies:
task shared-setup: # Common setup
task a: [shared-setup] # A's work
task b: [shared-setup] # B's workCommand Failed
Section titled “Command Failed”error: command exited with code 1Cause: A shell command returned a non-zero exit code.
Solutions:
- Run with
-v(verbose) to see the failing command - Run with
-n(dry-run) to see commands without executing - Use
@ignoreto continue on failure if appropriate:
task cleanup: @ignore rm -rf temp/ # Won't stop if this fails rm -rf cache/No Jakefile Found
Section titled “No Jakefile Found”error: No Jakefile foundCause: No Jakefile in current directory or parent directories.
Solutions:
- Create a
Jakefilein your project root - Use
-fto specify the path:jake -f scripts/Jakefile
Missing Required Environment Variable
Section titled “Missing Required Environment Variable”error: Required environment variable 'API_KEY' is not setCause: A @require directive specifies a variable that isn’t set.
Solutions:
- Set the variable:
export API_KEY=xxx - Create a
.envfile and add@dotenvto your Jakefile - Pass it inline:
API_KEY=xxx jake deploy
Missing Required Command
Section titled “Missing Required Command”error: Command 'docker' not foundHint: Install Docker from https://docker.comCause: A @needs directive specifies a command that isn’t installed.
Solutions:
- Install the missing command
- Check that it’s in your PATH
- If auto-install is configured, run the suggested task
File Target Never Rebuilds
Section titled “File Target Never Rebuilds”Cause: File target might have incorrect dependencies.
Check:
- Verify glob patterns match your files:
Terminal window jake -v build # Verbose shows matched files - Ensure the output file path matches the recipe name exactly
- Check that source files are actually being modified
File Target Always Rebuilds
Section titled “File Target Always Rebuilds”Cause: Output file might be missing or dependencies misconfigured.
Check:
- Verify the output file exists after build
- Ensure recipe creates the file at the exact path specified
- Check for typos in file paths
Watch Mode Not Detecting Changes
Section titled “Watch Mode Not Detecting Changes”Cause: Watch patterns might not match your files.
Solutions:
- Add explicit
@watchpatterns:task build:@watch src/**/*.tsnpm run build - Check that file system events are working (some editors use atomic saves)
- Try more specific patterns
Parallel Execution Issues
Section titled “Parallel Execution Issues”Cause: Tasks that should be sequential are running in parallel.
Solution: Ensure dependencies are correctly specified:
# This ensures compile runs before bundletask compile: tsc
task bundle: [compile] # Depends on compile esbuild dist/index.js
task build: [bundle] echo "Done"Getting Help
Section titled “Getting Help”If you’re still stuck:
- Run with
-vfor verbose output - Run with
-nfor dry-run to see what would execute - Check GitHub Issues
- Use
jake -s recipeto inspect a recipe’s full definition
jake -s deploy# Shows: type, dependencies, parameters, commands, hooks