Overview
This guide covers common issues you may encounter when integrating the AI Chat SDK and how to resolve them.Installation issues
Package not found
Symptom:npm install or pnpm add fails with “package not found”
Solution:
1
Configure .npmrc
Add the registry configuration to your
.npmrc file:.npmrc
2
Add your token
Replace
{YOUR_TOKEN_HERE} with your authentication token3
Install the package
Contact [email protected] if you need an authentication token.
Module not found
Symptom:Cannot find module '@sleek/ai-chat-sdk'
Solution: Verify your TypeScript configuration includes:
tsconfig.json
SDK initialization issues
SDK not initializing
Symptom: SDK initialization fails or throws error Solution: Enable debug mode to see detailed error messages:”SDK already initialized” error
Symptom: Error when callinginitializeAiChatSdk multiple times
Solution: Use getAiChatSdk() to retrieve the existing instance:
UI issues
Chat panel not appearing
Symptom: Callingsdk.initializeChat() doesn’t show the chat panel
Common causes:
- Invalid or missing API key
- SDK not initialized before calling
initializeChat() - JavaScript errors in console
1
Enable debug mode
2
Check browser console
Open DevTools (F12) and look for error messages
3
Verify initialization
Chat panel appears blank
Symptom: Panel opens but shows blank content Solution:- Verify your API key is valid
- Check browser console for network errors
- Ensure you have internet connectivity
- Try clearing browser cache
Data provider issues
Providers not being called
Symptom: Data providers never execute Solution: Ensure providers are configured correctly:Provider errors
Symptom: SDK stops working after provider throws error Solution: Always handle errors and return valid fallback values:Slow performance
Symptom: Chat feels sluggish or freezes Solution: Add timeouts to data providers (recommend 500ms):Event issues
Events not firing
Symptom: Event listeners are never called Solution: Ensure listeners are registered during initialization:Network issues
API requests failing
Symptom: Chat not responding, network errors in console Solution:1
Verify API key
Ensure your Zero Click AI API key is correct and active
2
Check network
Verify you have internet connectivity
3
Enable debug mode
4
Check browser console
Look for 401/403 errors indicating authentication issues
Browser compatibility
The SDK supports modern browsers:- Chrome 100+
- Firefox 100+
- Safari 15+
- Edge 100+
Debugging tips
Enable debug mode
Always start troubleshooting with debug mode enabled:Check SDK version
Verify you’re using the latest version:Test in incognito mode
Test in incognito/private browsing to rule out:- Browser extension interference
- Cached data issues
- Cookie problems
Check the console
Always check the browser DevTools Console (F12) for:- Error messages
- Network failures
- SDK debug logs
Common error messages
”Invalid API key”
Your API key is incorrect or inactive. Verify your key and ensure it’s active.”Failed to initialize SDK”
- Check that your API key is valid
- Enable debug mode to see specific error details
- Check browser console for additional errors
”Data provider error”
- Ensure providers return correct types (
nullor{}on error) - Add try-catch blocks to all providers
- Never throw exceptions from providers
Getting help
If you’re still experiencing issues, contact our support team. When contacting support, please include:- SDK version (
pnpm list @sleek/ai-chat-sdk) - Browser name and version
- Error messages from console (with
enableDebug: true) - Code snippet of your SDK initialization
- Steps to reproduce the issue

