This guide helps you resolve common issues when setting up and running KanaDojo locally.
Symptoms:
npm run devcommand hangs or shows errors- Build fails with network or font-related errors
- Terminal shows "Failed to fetch fonts from Google Fonts" errors
Root Cause: Next.js attempts to download Google Fonts during development, which can be blocked by:
- Windows Firewall
- Antivirus software (Windows Defender, Norton, McAfee, etc.)
- Corporate proxy settings
- VPN configurations
- DNS resolution issues
Solutions (try in order):
- Open Windows Security → Firewall & network protection
- Click "Allow an app through firewall"
- Click "Change settings" (requires admin)
- Find Node.js in the list
- Check both Private and Public boxes
- Click OK and restart your terminal
- Temporarily disable your antivirus software
- Try running
npm run devagain - If it works, add an exception for:
- Your project folder
node.exe(usually inC:\Program Files\nodejs\node.exe)npm.exeandnpx.exe
# Clear npm cache
npm cache clean --force
# Delete node_modules and package-lock.json
rmdir /s /q node_modules
del package-lock.json
# Reinstall dependencies
npm install
# Try running dev server
npm run devGoogle Fonts might be blocked over HTTPS. Try:
npm config set strict-ssl false
npm install
npm run devnpm config set strict-ssl trueSometimes Windows DNS causes issues. Try using Google DNS or Cloudflare DNS:
- Open Settings → Network & Internet
- Click your connection → Edit (under DNS)
- Choose Manual DNS
- Add these DNS servers:
- Google DNS:
8.8.8.8and8.8.4.4 - Cloudflare DNS:
1.1.1.1and1.0.0.1
- Google DNS:
- Save and restart your terminal
If you're behind a corporate proxy:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080Replace with your actual proxy address. To check if proxy is set:
npm config get proxy
npm config get https-proxyIf all else fails and you just need to start developing, you can temporarily disable font loading:
- Comment out font imports in
static/fonts.ts:
Open static/fonts.ts and comment out the problematic font imports at the top:
// Temporarily comment out all imports
/*
import {
Noto_Sans_JP,
Zen_Maru_Gothic,
// ... rest of imports
} from 'next/font/google';
*/- Create a fallback export:
At the end of static/fonts.ts, replace the export with:
// Temporary fallback for development
const fonts: any[] = [];
export default fonts;- Run dev server:
npm run devstatic/fonts.ts file before committing changes. This is only a temporary workaround for local development.
If issues persist, consider these alternatives:
Option A: GitHub Codespaces
- Go to your forked repository on GitHub
- Click Code → Codespaces → Create codespace on main
- Wait for the environment to load
- Run
npm installandnpm run dev - Access via the forwarded port
Option B: Windows Subsystem for Linux (WSL2)
# In PowerShell (as Administrator)
wsl --install
# After restart, open Ubuntu from Start Menu
# Clone your repo and set up in WSL2
cd ~
git clone https://github.com/<your-username>/kanadojo.git
cd kanadojo
npm install
npm run devWSL2 provides a Linux environment on Windows and typically avoids these font-fetching issues.
Solution:
sudo chown -R $USER ~/.npm
sudo chown -R $USER ./node_modulesSolution:
# Find and kill process on port 3000
lsof -ti:3000 | xargs kill -9
# Or use a different port
PORT=3001 npm run devSolution:
# Increase file watcher limit
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -pSolution:
# Use a faster registry mirror
npm config set registry https://registry.npmjs.org/
# Or try Cloudflare's mirror
npm config set registry https://registry.npmjs.cf/Solution:
# Increase timeout
npm config set timeout 60000
# Retry installation
npm install --prefer-offlineSolution:
# Delete TypeScript cache
rm -rf .next
rm -rf node_modules/.cache
# Reinstall and rebuild
npm install
npm run buildSolution:
# Reset ESLint cache
rm -rf .eslintcache
# Run lint fix
npm run lint:fixSolution: These are usually safe to ignore. If you want to resolve them:
npm install --legacy-peer-depsSolution:
# Check vulnerabilities
npm audit
# Attempt automatic fix
npm audit fix
# For high-severity issues only
npm audit fix --force# See detailed npm logs
npm run dev --verbose
# Or for maximum detail
npm run dev --loglevel sillynode --version # Should be 18.x or higher
npm --version # Should be 10.x or higher# Test if Google Fonts is accessible
curl -I https://fonts.googleapis.com
# On Windows use:
# Invoke-WebRequest -Uri https://fonts.googleapis.com -Method HeadIf none of these solutions work:
-
Check existing issues: GitHub Issues
-
Open a new issue:
- Include your OS and versions (Node, npm)
- Copy full error messages
- Describe what you've tried
- Add screenshots if applicable
-
Community help:
- GitHub Discussions
- Include relevant troubleshooting steps you've already tried
After resolving issues, verify everything works:
# Clean install
rm -rf node_modules .next
npm install
# Run development server
npm run dev
# In a new terminal, verify build works
npm run build
# Verify linting
npm run lintIf all commands complete successfully, you're ready to contribute! 🎉