Common Issues
Authentication Issues
Cannot Find Developer Token
Problem: You don’t know where to find your API key/developer token. Solution: Generate a developer token from your Aden dashboard:- Log in to your Aden Dashboard
- Go to Settings > API Keys
- Click on Generate New Key
- Copy the key immediately and store it securely
Installation Issues
Package Not Found
Problem:npm install aden-ts fails or package is not found.
Solution:
- Ensure you’re using Node.js 18.0.0 or higher:
- Clear npm cache and try again:
- Check your npm registry:
Peer Dependency Warnings
Problem: Getting peer dependency warnings when installingaden-ts.
Why this happens: The SDK has peer dependencies on LLM provider SDKs (like openai, @anthropic-ai/sdk). You only need to install the ones you’re actually using.
Solution: Install the provider SDKs you need:
Module Resolution Errors
Problem: Getting errors likeCannot find module 'aden-ts' or Module not found.
Solution:
- For TypeScript projects, ensure your
tsconfig.jsonhas correct module resolution:
- For CommonJS projects, use
require():
- For ESM projects, ensure you’re using
import:
Instrumentation Issues
No Metrics Being Captured
Problem: After callinginstrument(), no metrics are being emitted.
Solution:
- Verify you’re calling
instrument()BEFORE creating SDK clients:
- Check that you’re passing the SDK class to
instrument():
- Verify your emitter is configured. Use
createConsoleEmitter()for debugging:
TypeScript Type Errors
Problem: Getting TypeScript errors when using the SDK. Solution:- Ensure you’re using TypeScript 5.0.0 or higher:
- Update your
tsconfig.json:
- If using import types, ensure proper syntax:
Instrumentation Not Working in Production
Problem: Instrumentation works locally but not in production/deployed environment. Checklist:- Environment variables: Ensure
ADEN_API_KEYis set in production - Build process: Verify the SDK is included in your production bundle
- Initialization timing: Ensure
instrument()is called before SDK clients are created - Network access: Verify your production environment can reach
kube.acho.io
Runtime Issues
Top-level await Error
Problem: Getting errors likeSyntaxError: await is only valid in async functions.
Why this happens: You’re using await instrument() at the top level, but your environment doesn’t support top-level await.
Solution:
Use an async IIFE (Immediately Invoked Function Expression):
.then():
Streaming Not Working
Problem: Streaming responses are not being tracked or metrics are incomplete. Solution:- Ensure you’re fully consuming the stream:
- Handle stream errors properly:
Connection Issues
Cannot Connect to Control Server
Problem: SDK cannot connect to the Aden control server atkube.acho.io.
Checklist:
- Verify API Key: Ensure
ADEN_API_KEYenvironment variable is set correctly - Check Network: Verify you can reach the server:
- Firewall: Check if your firewall or corporate proxy is blocking the connection
- SSL/TLS: Ensure your Node.js installation supports modern TLS (Node.js 18+ recommended)
failOpen: true (default) to allow requests even if server is unreachable:
Timeout Errors
Problem: Requests to the control server are timing out. Solution:- Check your internet connection
- Verify the control server status
- If behind a proxy, configure proxy settings:
Framework-Specific Issues
Vercel AI SDK Not Tracking
Problem: Using Vercel AI SDK but metrics aren’t being captured. Solution: Vercel AI SDK requires fetch instrumentation. Ensure you’re instrumenting before importing:Next.js Module Errors
Problem: Getting module resolution errors in Next.js applications. Solution:- For Next.js 13+ with App Router, ensure you’re using Server Components for instrumentation:
- Add to
next.config.jsif needed:
Getting Help
If you’re still experiencing issues: When reporting issues, please include:- Node.js version (
node --version) - TypeScript version (if applicable):
npx tsc --version aden-tsversion:npm list aden-ts- Package manager (npm, yarn, pnpm, bun)
- Operating system
- Minimal code example that reproduces the issue
- Full error message and stack trace