Quick Error Reference
TypeError: X is not a function
TypeError: X is not a function
Symptom: Task call fails at runtimeLikely Cause: Forgot
.build() on task/resource definitionFix:Resource 'X' not found
Resource 'X' not found
Symptom: Runtime crash during initializationLikely Cause: Component not registeredFix:
Config validation failed for X
Config validation failed for X
Symptom: Startup crash before app runsLikely Cause: Missing
.with() config for resourceFix:Visibility violation error
Visibility violation error
Symptom:
run(app) fails with runner.errors.visibilityViolationLikely Cause: Cross-resource reference to a non-exported itemFix:Circular dependency detected
Circular dependency detected
Symptom: Fix for type inference cycle:
Use explicit type annotation:
run(app) fails or TypeScript inference failsLikely Cause: Actual dependency cycle or import cycleFix for runtime cycle:
Break the dependency loop across tasks/resources:TimeoutError
TimeoutError
Symptom: Task hangs then throwsLikely Cause: Operation exceeded timeout TTLFix:
Cannot read property 'X' of undefined
Cannot read property 'X' of undefined
Symptom: Task crashes mid-executionLikely Cause: Dependency not properly injectedFix:
Common First Failures
New to Runner? These are mistakes everyone makes when learning the framework.
Forgot .build()
TypeError: myTask is not a function or strange type errors.
Forgot to Register
dependencies says “I need these” — register says “these exist”.
Missing .with() Config
Calling Task Before Runtime
Debug Mode
Enable verbose debugging to see what’s happening:Debug Levels
| Level | What’s Logged |
|---|---|
"normal" | Lifecycle events, errors, event emissions |
"verbose" | All of above + task inputs/outputs, resource configs |
Per-Component Debugging
Lifecycle Issues
Resources not disposing properly
Resources not disposing properly
Symptom: Hanging process, “port already in use” on restart, connection leaksFix: Ensure every resource with setup has matching cleanup:
Shutdown hanging forever
Shutdown hanging forever
Symptom:
dispose() never resolvesLikely causes:- Dispose function has unresolved promise
- Resource left open handles (timers/sockets)
- Circular await in dispose chain
Performance Issues
Slow task execution
Slow task execution
Check middleware order — faster middleware should come first:
Missing cache hits
Missing cache hits
Enable verbose logging to see cache behavior:
Slow initialization
Slow initialization
Profile startup time:Common causes:
- Sequential resource initialization (use
initMode: "parallel") - Expensive operations in
init()functions - Network calls during startup
TypeScript Issues
Circular type inference
Circular type inference
Symptom: TypeScript shows
any or fails to infer types in circular importsSolution: Explicitly type the resource that closes the loop:Type errors with middleware contracts
Type errors with middleware contracts
Symptom: Task input/output types don’t match middleware expectationsFix: Ensure task satisfies all middleware contracts:
Platform-Specific Issues
AsyncLocalStorage not available (Browser/Edge)
AsyncLocalStorage not available (Browser/Edge)
Symptom:
PlatformUnsupportedFunction when using async contextCause: Async context requires Node.js AsyncLocalStorageSolution: Use Node.js or redesign to avoid request-scoped state:Durable workflows fail (non-Node)
Durable workflows fail (non-Node)
Symptom: Import error or runtime error when using durable workflowsCause: Durable workflows are Node.js-only (
@bluelibs/runner/node)Solution: Use Node.js runtime for durable workflows, or redesign using tasks + external job queue.Filing a Good Issue
When you need help, include this information:Expected Behavior
What should happen.Actual Behavior
What actually happens.Error Output
Debug Logs
- Minimal reproduction > walls of code
- Stack traces > “it doesn’t work”
- Debug logs often reveal the issue before you file
Additional Resources
GitHub Issues
Search existing issues or file a new one
Examples
Reference working examples
Migration Guide
Upgrading between versions
Production Readiness
Pre-deployment checklist
Still Stuck?
- Search existing issues: GitHub Issues
- Check examples: Examples directory
- Ask the AI: Runner Chatbot
- Open an issue: New Issue
- Enterprise support: Contact us