Skip to content

Troubleshooting

Error:

Error: Failed to fetch Storybook index: ENOENT: no such file or directory

Solutions:

  1. Build your Storybook first:

    Terminal window
    npm run build-storybook
  2. Verify the path to index.json:

    Terminal window
    ls -la storybook-static/index.json
  3. Use the correct path in the command:

    Terminal window
    --index-file ./storybook-static/index.json

Error:

Error: Invalid API key provided

Solutions:

  1. Verify your API key is set correctly:

    Terminal window
    echo $SKILLGEN_API_KEY
  2. Check for extra spaces or newlines:

    Terminal window
    export SKILLGEN_API_KEY="sk-..." # Use quotes
  3. Ensure you’re using the right key for the right provider:

    • OpenAI: Starts with sk-
    • Anthropic: Starts with sk-ant-
    • Google: No specific prefix

Error:

Error: Rate limit exceeded (429)

Solutions:

  1. Reduce concurrency:

    Terminal window
    --concurrency 1
  2. Add retries with exponential backoff:

    Terminal window
    --retries 5
  3. Increase timeout:

    Terminal window
    --timeout 120000
  4. Wait a few minutes and try again

Error:

Error: Request timeout after 60000ms

Solutions:

  1. Increase timeout:

    Terminal window
    --timeout 120000 # 2 minutes
  2. Reduce concurrency:

    Terminal window
    --concurrency 2
  3. Check your internet connection

Error:

Warning: Source file not found for component X

Solutions:

  1. Verify your source directory:

    Terminal window
    ls -la src/components
  2. Use the correct source directory:

    Terminal window
    --source-dir ./src/components
  3. Use --server-only mode if you don’t have source files:

    Terminal window
    --server-only

Issue: Generated SKILL.md files are empty or missing information

Solutions:

  1. Enable verbose logging:

    Terminal window
    --verbose
  2. Save debug logs:

    Terminal window
    --log-prompts ./debug-logs
  3. Check your Storybook has stories with docs:

    • Visit your Storybook URL
    • Verify stories are visible
    • Check index.json contains component metadata
  4. Try a different model:

    Terminal window
    --model gpt-4o # or claude-3-5-sonnet-20241022

Error:

Error: EACCES: permission denied, mkdir './skills'

Solutions:

  1. Check directory permissions:

    Terminal window
    ls -la ./
  2. Use a different output directory:

    Terminal window
    --output-dir ~/skills
  3. Run with appropriate permissions (avoid sudo if possible)

Error:

Error: getaddrinfo ENOTFOUND api.openai.com

Solutions:

  1. Check your internet connection
  2. Verify DNS is working:
    Terminal window
    ping api.openai.com
  3. Check firewall/proxy settings
  4. Try a different network

“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

“Invalid API key” error:

“Overloaded” error:

  • Anthropic’s servers are at capacity
  • Wait a few minutes and retry
  • Use --retries 5 for automatic retries

“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

If you can’t resolve your issue:

  1. Check existing issues: GitHub Issues
  2. Enable debug mode: Run with --verbose and --log-prompts ./debug
  3. 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)

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.

A: Yes! Use --prompt-file to provide a custom system prompt. See Advanced Configuration.

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.