Installation issues
npm install fails
Error: EACCES permission denied
Error: EACCES permission denied
- Never use
sudowith npm - it can cause security issues - Configure npm to use a different directory:
- Retry the installation:
Error: ERESOLVE unable to resolve dependency tree
Error: ERESOLVE unable to resolve dependency tree
-
Clear npm cache:
-
Delete
node_modulesandpackage-lock.json: -
If still failing, use the legacy peer deps flag:
Wrong Node.js version
Wrong Node.js version
-
Check your current version:
-
If below v20, install the latest LTS version:
- Using nvm:
- Or download from nodejs.org
- Using nvm:
-
Verify the installation:
Development server issues
Frontend server won’t start
Error: Port 5173 is already in use
Error: Port 5173 is already in use
-
Find the process using port 5173:
-
Kill the process:
-
Or use a different port in
vite.config.ts:
Error: Cannot find module '@vitejs/plugin-vue'
Error: Cannot find module '@vitejs/plugin-vue'
- Ensure you’re in the correct directory (project root, not
server/) - Reinstall dependencies:
- Verify the plugin is in
package.jsondevDependencies
Backend server won’t start
Error: Cannot find module 'nitropack'
Error: Cannot find module 'nitropack'
-
Navigate to the server directory:
-
Install dependencies:
-
Start the server:
Backend starts but API returns errors
Backend starts but API returns errors
- Verify your
DATABASE_URLenvironment variable is set - Ensure PostgreSQL is running
- Regenerate Prisma client:
- Check database connection:
Database issues
Prisma connection errors
Error: Can't reach database server
Error: Can't reach database server
-
Check if PostgreSQL is running:
-
Start PostgreSQL if needed:
-
Verify your
DATABASE_URLin.env: -
Test the connection:
Error: database does not exist
Error: database does not exist
-
Connect to PostgreSQL:
-
Create the database:
-
Exit psql:
-
Run Prisma migrations:
Error: Prisma schema not found
Error: Prisma schema not found
prisma/ folder exists), not from server/ directory:Migration issues
Error: Migration failed to apply
Error: Migration failed to apply
-
Development databases - Reset and reapply:
-
Specific migration issues - Check migration file in
prisma/migrations/ -
Production-like environments - Create a new migration to fix conflicts:
TypeScript issues
Type checking errors
Error: Cannot find module '@/components/...'
Error: Cannot find module '@/components/...'
@ path alias.Solution:This is usually normal - the @ alias is configured in vite.config.ts for Vite, but TypeScript needs its own configuration.-
Verify
tsconfig.app.jsonincludes: - Restart your IDE/TypeScript server
Error: Cannot find name 'defineEventHandler'
Error: Cannot find name 'defineEventHandler'
- Ensure you’re in the
server/directory - Run Nitro’s prepare script:
- Restart your TypeScript server in your IDE
Vue component types not working
Vue component types not working
.vue file imports.Solution:- Install the Volar extension in VSCode (not Vetur)
- Enable the Vue TypeScript plugin:
- Press Cmd/Ctrl + Shift + P
- Type “TypeScript: Select TypeScript Version”
- Choose “Use Workspace Version”
- Ensure
vue-tscis installed:
CORS and API issues
API requests failing
Error: CORS policy blocked the request
Error: CORS policy blocked the request
- Verify backend is running (check terminal)
- Check
server/nitro.config.tsincludes CORS config: - Restart the backend server after config changes
- Clear browser cache and hard reload (Cmd/Ctrl + Shift + R)
API returns 404 for all endpoints
API returns 404 for all endpoints
- Verify backend server is running
- Check the API endpoint URL structure:
- Check backend terminal for the actual port number
- Verify file structure in
server/api/matches expected routes
Build issues
Frontend build fails
Error: TypeScript build errors
Error: TypeScript build errors
-
Run type checking to see all errors:
- Fix each error individually
-
Common fixes:
- Add proper type annotations
- Use
!operator for non-null assertions (if certain value exists) - Import types:
import type { Driver } from '@prisma/client'
Error: Out of memory during build
Error: Out of memory during build
General troubleshooting tips
Clean slate approach
When multiple issues occur, try a complete reset:Check your environment
Verify your development environment:Enable verbose logging
For more detailed error information:Still stuck?
If you can’t resolve your issue:- Check existing GitHub issues
- Search for your error message online
- Create a new issue with:
- Detailed description of the problem
- Steps to reproduce
- Error messages (full stack trace)
- Your environment (OS, Node version, etc.)
- What you’ve already tried
node --version and npm --version to help diagnose version-related problems.