Troubleshooting
Solutions for common issues in Velocity.
Installation Issues
Section titled “Installation Issues””Cannot find module” errors
Section titled “”Cannot find module” errors”Clear and reinstall dependencies:
rm -rf node_modules pnpm-lock.yamlpnpm installNode version errors
Section titled “Node version errors”Astro 6 requires Node.js 22.12.0+:
node --version # Should be 22.12.0 or higher
# Using nvmnvm install 22nvm use 22Build Issues
Section titled “Build Issues”Tailwind classes not applying
Section titled “Tailwind classes not applying”- Check that
global.cssis imported in your layout - Ensure the file is in Tailwind’s content paths
- For scoped styles, use
@reference:
<style> @reference "../../styles/global.css"; h1 { @apply text-2xl; }</style>Content collection type errors
Section titled “Content collection type errors”Regenerate types:
pnpm astro syncOG images not generating
Section titled “OG images not generating”- Check that dimensions are valid (1200x630 recommended)
- Ensure fonts are available
- Check build logs for errors
pnpm build 2>&1 | grep -i errorDevelopment Issues
Section titled “Development Issues”Hot reload not working
Section titled “Hot reload not working”Try restarting the dev server:
# Stop with Ctrl+Cpnpm devTypeScript errors
Section titled “TypeScript errors”Update types:
pnpm astro syncpnpm checkImport alias not resolving
Section titled “Import alias not resolving”Check tsconfig.json:
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } }}Component Issues
Section titled “Component Issues”Styles not scoped
Section titled “Styles not scoped”Use <style> without is:global:
<style> /* These styles are scoped */ .my-class { color: red; }</style>Client-side interactivity not working
Section titled “Client-side interactivity not working”Add a client directive:
<Counter client:visible /><Modal client:load />Images not loading
Section titled “Images not loading”Use absolute paths from public/ or import:
---import myImage from '@/assets/image.png';---
<img src={myImage.src} alt="Description" />Deployment Issues
Section titled “Deployment Issues”Environment variables not working
Section titled “Environment variables not working”- Ensure variables are set in hosting dashboard
- Redeploy after adding variables
- Check
PUBLIC_prefix for client-side variables
Build fails on hosting
Section titled “Build fails on hosting”Check that your hosting provider supports Node.js 22+.
Set in your hosting configuration:
NODE_VERSION=22404 on routes
Section titled “404 on routes”For static hosting, ensure trailingSlash is configured:
export default defineConfig({ trailingSlash: 'always', // or 'never'});Getting Help
Section titled “Getting Help”- Astro Discord: https://astro.build/chat
- GitHub Issues: https://github.com/southwellmedia-dev/velocity/issues