FAQ & Troubleshooting
FAQ & Troubleshooting — Code Management
Below are answers to common problems developers may face when managing or running code.
Port Already in Use
Error: Port 3000 is already in use
Solution:
- Find the process using the port:
lsof -i :3000 - Kill the process (replace
<PID>):kill -9 <PID> - Or change the port in your
.envor config:PORT=3001
Permission Denied (File or Directory)
Error: EACCES: permission denied, open 'file/path'
Solution:
- Check file or folder permissions:
ls -la file/path - Change ownership or add permissions:
sudo chown -R $USER:$USER file/path chmod +rw file/path - Avoid using
sudoto start dev servers unless necessary.
Git Push Rejected
Error: [rejected] main -> main (non-fast-forward)
Solution:
- Pull the latest changes first:
git pull origin main --rebase - Resolve conflicts (if any), then:
git push origin main
Changes Not Reflected After Build
Why are my changes not showing up?
Possible Causes: - Cache issues - Build server not watching the file - Wrong import path
Solutions: - Restart the development server - Clear browser cache or try in Incognito mode - Verify the file is saved and properly imported
Environment Variables Not Loading
Error: Environment variables undefined
Solution:
- Ensure
.envfile exists with:DB_USER=myuser DB_PASSWORD=securepass - Use a loader (e.g., for Node.js):
require('dotenv').config(); - Restart the app after making changes to
.env - Ensure
.envis not accidentally committed (add it to.gitignore)
🛠 Still Stuck?
Check the console or server logs for more specific errors. If the issue persists, contact the DevOps or Infra team with logs and steps to reproduce the issue.