Graph Not Rendering
Container Has No Dimensions
Problem: The graph appears blank or shows nothing. Cause: The parent container has no explicit width or height (0x0 dimensions). Solution: Always set explicit dimensions on the container:CSS Not Loading
Problem: Graph renders but has no styling or looks broken. Cause: CSS injection failed or was blocked. Solution:- Check browser console for errors
- Try manual CSS import:
- Verify your bundler supports CSS imports
No Data Displayed
Problem: Loading completes but no nodes appear. Diagnosis:- Empty
documentsarray - Documents have no
memoryEntries - Data structure doesn’t match expected type
Performance Issues
Slow Rendering with Large Datasets
Problem: Graph becomes sluggish with 500+ documents. Solution: Implement pagination:The graph uses viewport culling and Level-of-Detail (LOD) rendering automatically. Performance degradation typically starts around 1000+ nodes.
High Memory Usage
Problem: Browser uses excessive memory. Cause: Too many documents loaded at once. Solution:- Limit initial load to 200-500 documents
- Use pagination to load incrementally
- Consider filtering by space/container
Laggy Interactions
Problem: Pan/zoom feels sluggish. Diagnosis:- Check document count:
documents.length - Check browser FPS in DevTools Performance tab
- Check canvas size (very large canvases are slower)
- Reduce number of visible documents
- Ensure container isn’t larger than viewport
- Close other resource-intensive tabs
Data Fetching Errors
CORS Errors
Problem:Access-Control-Allow-Origin error in console.
Cause: Trying to fetch directly from client to Supermemory API.
Solution: Always use a backend proxy:
401 Unauthorized
Problem: Backend returns 401 error. Common Causes:- API key is missing or invalid
- API key not in environment variables
- Environment variables not loaded
500 Internal Server Error
Problem: Backend returns 500 error. Diagnosis: Check backend logs for details. Common Causes:- Network error reaching Supermemory API
- Invalid request body
- API key lacks permissions
API Key Exposure Warning
Problem: API key visible in Network tab or client code. Risk: Anyone can steal your API key and make unauthorized requests. Solution:- Remove API key from client code immediately
- Rotate your API key in Supermemory dashboard
- Implement backend proxy (see Quick Start guide)
TypeScript Errors
Type Mismatch
Problem: TypeScript errors ondocuments prop.
Solution: Import and use the correct type:
Missing Type Definitions
Problem: TypeScript can’t find types. Solution:- Verify package is installed:
npm list @supermemory/memory-graph - Restart TypeScript server in your IDE
- Check
node_modules/@supermemory/memory-graph/dist/index.d.tsexists
Browser Compatibility
Not Working in Safari
Issue: Graph doesn’t render in Safari. Cause: Older Safari versions lack some Canvas 2D features. Solution: Ensure users are on Safari 14+ or suggest Chrome/Firefox.Mobile Touch Gestures Not Working
Issue: Can’t pinch-to-zoom on mobile. Cause: Browser or container blocking touch events. Solution: Ensure parent has no conflicting touch handlers:Canvas Appears Blurry
Issue: Graph looks pixelated or blurry. Cause: High-DPI displays not being handled correctly. Solution: This should be automatic. If it persists:- Check browser zoom is at 100%
- Verify
devicePixelRatiois being respected - Try different browser
Build Errors
Module Not Found
Error:Cannot find module '@supermemory/memory-graph'
Solution:
- Reinstall package:
npm install @supermemory/memory-graph - Clear node_modules:
rm -rf node_modules && npm install - Check package.json includes the package
Build Fails with CSS Error
Error:Failed to parse CSS or similar.
Cause: Bundler doesn’t support CSS-in-JS.
Solution: The package uses automatic CSS injection - no CSS import needed. If you must import CSS:
Still Having Issues?
When reporting issues, please include:- Browser and version
- Package version (
npm list @supermemory/memory-graph) - Framework (Next.js, React, etc.) and version
- Minimal reproduction code
- Console errors or screenshots