Troubleshooting
Common Issues
Section titled “Common Issues”Index File Not Found
Section titled “Index File Not Found”Error:
Error: Failed to fetch Storybook index: ENOENT: no such file or directorySolutions:
-
Build your Storybook first:
Terminal window npm run build-storybook -
Verify the path to
index.json:Terminal window ls -la storybook-static/index.json -
Use the correct path in the command:
Terminal window --index-file ./storybook-static/index.json
API Key Issues
Section titled “API Key Issues”Error:
Error: Invalid API key providedSolutions:
-
Verify your API key is set correctly:
Terminal window echo $SKILLGEN_API_KEY -
Check for extra spaces or newlines:
Terminal window export SKILLGEN_API_KEY="sk-..." # Use quotes -
Ensure you’re using the right key for the right provider:
- OpenAI: Starts with
sk- - Anthropic: Starts with
sk-ant- - Google: No specific prefix
- OpenAI: Starts with
Rate Limit Errors
Section titled “Rate Limit Errors”Error:
Error: Rate limit exceeded (429)Solutions:
-
Reduce concurrency:
Terminal window --concurrency 1 -
Add retries with exponential backoff:
Terminal window --retries 5 -
Increase timeout:
Terminal window --timeout 120000 -
Wait a few minutes and try again
Timeout Errors
Section titled “Timeout Errors”Error:
Error: Request timeout after 60000msSolutions:
-
Increase timeout:
Terminal window --timeout 120000 # 2 minutes -
Reduce concurrency:
Terminal window --concurrency 2 -
Check your internet connection
Source Files Not Found
Section titled “Source Files Not Found”Error:
Warning: Source file not found for component XSolutions:
-
Verify your source directory:
Terminal window ls -la src/components -
Use the correct source directory:
Terminal window --source-dir ./src/components -
Use
--server-onlymode if you don’t have source files:Terminal window --server-only
Empty or Incomplete Output
Section titled “Empty or Incomplete Output”Issue: Generated SKILL.md files are empty or missing information
Solutions:
-
Enable verbose logging:
Terminal window --verbose -
Save debug logs:
Terminal window --log-prompts ./debug-logs -
Check your Storybook has stories with docs:
- Visit your Storybook URL
- Verify stories are visible
- Check
index.jsoncontains component metadata
-
Try a different model:
Terminal window --model gpt-4o # or claude-3-5-sonnet-20241022
Permission Denied
Section titled “Permission Denied”Error:
Error: EACCES: permission denied, mkdir './skills'Solutions:
-
Check directory permissions:
Terminal window ls -la ./ -
Use a different output directory:
Terminal window --output-dir ~/skills -
Run with appropriate permissions (avoid
sudoif possible)
Network Errors
Section titled “Network Errors”Error:
Error: getaddrinfo ENOTFOUND api.openai.comSolutions:
- Check your internet connection
- Verify DNS is working:
Terminal window ping api.openai.com - Check firewall/proxy settings
- Try a different network
Provider-Specific Issues
Section titled “Provider-Specific Issues”OpenAI
Section titled “OpenAI”“Model not found” error:
- Verify the model name is correct:
gpt-4o,gpt-4-turbo,gpt-3.5-turbo - Check you have access to the model (some require special access)
“Insufficient quota” error:
- Add credits to your OpenAI account
- Check your usage page
Anthropic
Section titled “Anthropic”“Invalid API key” error:
- Ensure key starts with
sk-ant- - Regenerate key in Anthropic Console
“Overloaded” error:
- Anthropic’s servers are at capacity
- Wait a few minutes and retry
- Use
--retries 5for automatic retries
Google AI
Section titled “Google AI”“API key not valid” error:
- Get a new key from AI Studio
- Enable the Generative Language API
“Model not found” error:
- Verify model name:
gemini-2.0-flash-exp,gemini-1.5-pro,gemini-1.5-flash - Some models are region-specific
Getting Help
Section titled “Getting Help”If you can’t resolve your issue:
- Check existing issues: GitHub Issues
- Enable debug mode: Run with
--verboseand--log-prompts ./debug - Create a new issue: New Issue
Include in your issue:
- CLI version (
storybook-to-skills-md --version) - Node version (
node --version) - Operating system
- Full command you ran
- Error message and stack trace
- Debug logs (if applicable)
Q: Can I use multiple providers at once?
Section titled “Q: Can I use multiple providers at once?”A: No, you must choose one provider per run. You can run the tool multiple times with different providers if needed.
Q: How much does it cost to generate SKILL.md files?
Section titled “Q: How much does it cost to generate SKILL.md files?”A: Costs vary by provider and model. See Provider Overview for estimates.
Q: Do I need to regenerate files every time I change a component?
Section titled “Q: Do I need to regenerate files every time I change a component?”A: No! The tool uses caching (.skill-meta.json) to detect changes. Only modified components are regenerated.
Q: Can I customize the generated content?
Section titled “Q: Can I customize the generated content?”A: Yes! Use --prompt-file to provide a custom system prompt. See Advanced Configuration.
Q: Does this work with Storybook v6?
Section titled “Q: Does this work with Storybook v6?”A: The tool is designed for Storybook v7+. Storybook v6 may work but is not officially supported.
Q: Can I run this locally without deploying Storybook?
Section titled “Q: Can I run this locally without deploying Storybook?”A: Yes! Use --index-file to point to a local storybook-static/index.json build. See Offline Mode.