-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Common issues and solutions for the api-docs CLI.
Puppeteer needs a Chromium browser to extract documentation from JavaScript-rendered pages.
Solutions:
-
Let Puppeteer download its own browser:
npx puppeteer browsers install chrome
-
Use a system-installed Chrome:
export PUPPETEER_EXECUTABLE_PATH=/path/to/chrome -
Install Chromium via your package manager:
# macOS brew install chromium # Ubuntu/Debian sudo apt install chromium-browser # Windows (via Chocolatey) choco install chromium
If extraction times out, the page may be slow to load or blocking automated browsers.
Solutions:
-
Try a direct URL to the OpenAPI spec instead:
api-docs endpoints https://api.example.com/openapi.json
-
Check if the site requires authentication or has bot protection
-
Ensure stable network connection
The CLI couldn't extract endpoints from the provided URL.
Possible causes:
- Not an API docs page - The URL doesn't contain OpenAPI/Swagger documentation
- Unsupported format - The documentation uses a framework we don't support yet
- JavaScript required - The page needs JavaScript but Puppeteer failed
Solutions:
-
Try the direct OpenAPI spec URL if available:
api-docs endpoints https://api.example.com/openapi.yaml
-
Use a different URL format:
# Instead of docs homepage api-docs endpoints https://docs.example.com/api/reference -
Check if the API publishes its spec file location in their docs
The URL was detected as an OpenAPI spec but couldn't be parsed.
Possible causes:
- Invalid OpenAPI/Swagger syntax
- YAML parsing error
- Network error during fetch
Solutions:
- Verify the spec URL is accessible in a browser
- Check if the spec is valid using Swagger Editor
- Try fetching again with
--force:api-docs fetch https://api.example.com/openapi.json --force
The provider name wasn't found in APITracker.io.
Solutions:
- Check the provider name spelling
- Try variations (e.g., "github" vs "GitHub")
- Use the direct docs URL instead:
api-docs endpoints https://docs.provider.com/api
Network error when contacting APITracker.io.
Solutions:
- Check your internet connection
- APITracker.io may be temporarily down - try again later
- Use a direct URL as a workaround
Clear the cache and fetch fresh:
# Clear all caches
api-docs clear
# Or clear specific cache
api-docs clear https://api.example.com/openapi.json
# Fetch fresh
api-docs endpoints stripe --forceIf you see permission errors:
# Check cache directory
ls -la ~/.cache/api-docs-cli/
# Fix permissions if needed
chmod -R u+rw ~/.cache/api-docs-cli/The CLI requires Node.js 20.0.0 or higher.
Solution:
Update Node.js:
# Using nvm
nvm install 20
nvm use 20
# Or download from nodejs.orgIf you see ES module errors:
- Ensure you're using Node.js 20+
- Try reinstalling:
npm uninstall -g @tidalstudios/api-docs-cli npm install -g @tidalstudios/api-docs-cli
If you encounter an issue not covered here:
- Check the GitHub Issues
- Open a new issue with:
- Command you ran
- Error message
- Node.js version (
node --version) - Operating system