Troubleshooting
Common issues and solutions when using Frontfriend
Troubleshooting
This guide covers common issues you might encounter when using Frontfriend and how to resolve them.
Installation Issues
npm install fails
Error: npm ERR! 404 Not Found - GET https://registry.npmjs.org/@frontfriend%2ftailwind
Solution: Ensure you're using the correct package name:
Peer dependency warnings
Warning: npm WARN peer dependency not satisfied
Solution: Install required peer dependencies:
Configuration Issues
ff-id not found
Error: Error: ff-id not found in configuration
Solutions:
-
Create
frontfriend.config.jsin your project root: -
Check file location - must be in project root, not in src/
-
Verify syntax - use quotes around 'ff-id' key
Config file not loading
Error: Cannot find frontfriend.config.js
Solutions:
-
For ES modules, use proper export syntax:
-
For CommonJS, use module.exports:
Token Issues
Styles not applying
Symptoms: Design tokens not working, no custom colors available
Solutions:
-
Run initialization:
-
Check cache status:
-
Force refresh:
-
Restart dev server after init
Cache expired
Error: Token cache is older than 7 days
Solution: Tokens auto-refresh after 7 days. Force refresh if needed:
Invalid tokens
Error: Failed to parse design tokens
Solutions:
- Verify your ff-id is correct
- Check network connectivity
- Contact support if issue persists
Component Issues
Components not found after download
Symptom: Downloaded components but can't import them
Solutions:
-
Check download location:
-
Verify import path matches alias:
-
Update TypeScript paths in tsconfig.json:
Wrong framework components
Error: Component syntax doesn't match your framework
Solution: Specify correct framework when downloading:
Components overwriting custom code
Problem: Downloaded components replaced your modifications
Solutions:
- Back up modified components before downloading
- Use different output directory:
- Consider extending components instead of modifying
Build Issues
Tailwind plugin not working
Error: Cannot find module '@frontfriend/tailwind'
Solutions:
-
Check Tailwind config syntax:
-
Ensure package is installed:
PostCSS errors
Error: PostCSS plugin tailwindcss requires PostCSS 8
Solution: Update PostCSS and Tailwind to compatible versions:
Vite specific issues
Error: Failed to resolve import
Solution: Add to vite.config.js:
Network Issues
Behind corporate proxy
Error: ETIMEDOUT or ECONNREFUSED
Solution: Set proxy environment variables:
API rate limiting
Error: 429 Too Many Requests
Solution: Wait a few minutes before retrying. Tokens are cached for 7 days to minimize API calls.
Getting Help
If you're still experiencing issues:
-
Check verbose output:
-
Clear cache and retry:
-
Contact support with:
- Error message
- Output of
npx frontfriend status - Your frontfriend.config.js (without ff-id)
- Framework and version info