Repository navigation
Troubleshooting
Common issues and solutions for Context Processor.
Solutions:
-
Clear npm cache:
npm cache clean --force npm install context-processor
-
Check Node version (requires 16.0.0+):
node --version
-
Reinstall:
rm -rf node_modules package-lock.json npm install
Solution: Initialize the processor:
import { ContextProcessor } from "context-processor";
const processor = new ContextProcessor();Solutions:
-
Create contexts directory:
mkdir -p ./contexts
-
Check permissions:
chmod 755 ./contexts
-
Check disk space:
df -h
Solutions:
-
Verify contexts exist:
const all = processor.list(); console.log("Total:", all.length);
-
Check tag exact match (tags are case-sensitive):
processor.search({ tags: ["react"] }); // lowercase
-
Remember AND logic for multiple tags:
processor.search({ tags: ["react", "hooks"] }); // Returns only contexts with BOTH tags
Solutions:
-
Process in batches:
for (let i = 0; i < items.length; i += 100) { const batch = items.slice(i, i + 100); batch.forEach(item => processor.save(item)); await delay(100); }
-
Use simpler models:
processor.save(data, "clarify"); // Faster than comprehensive
-
Use pagination:
processor.list({ limit: 100, offset: 0 });
Solutions:
-
Process incrementally, not all at once
-
Clear old contexts regularly:
const old = processor.list() .filter(c => Date.now() - c.updatedAt > 30 * 24 * 60 * 60 * 1000); old.forEach(c => processor.delete(c.id));
-
Increase Node memory:
node --max-old-space-size=4096 app.js
Solutions:
-
Verify model exists:
const models = processor.listModels(); console.log(models.map(m => m.name));
-
Check model info:
const info = processor.getModelInfo("comprehensive"); console.log(info.strategies);
Note: Clarity scoring is algorithmic and serves as a guideline. Review the suggestions instead of relying solely on the score.
Solution: This is fixed in v1.0.1+ with sequential test execution. Ensure you have the latest version:
npm install context-processor@latest- Check this troubleshooting guide
- Review the FAQ
- Gather error details and system info:
node --version npm --version npm list context-processor
- What you were trying to do
- Exact error message
- Steps to reproduce
- System info (OS, Node version)
- Code snippet if possible
- Batch operations - Process groups of items together
- Pagination - Use limit/offset for large lists
- Minimize preprocessing - Use specific models, not always comprehensive
- Monitor memory - Watch RAM usage with large datasets
Still need help? Open a GitHub Issue or join Community Testing!