Solutions to common problems with your development environment.
Problem: Command not recognized after installing Node.js
Solutions:
node -v againecho $env:PATHProblem: Python command not recognized
Solutions:
python --versionpy --version as alternativeProblem: Git command not recognized
Solutions:
Problem: Docker Desktop wonât start or crashes
Solutions:
Problem: âCannot be loaded because running scripts is disabledâ
Solution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
Problem: Permission denied for certain operations
Solution:
Start-Process powershell -Verb runasProblem: Just installed something but new shell doesnât see it
Solution:
Problem: Wrong version running
Solution:
where python # Shows all Python locations
where node # Shows all Node.js locations
# Use full path if needed
C:\Python311\python.exe --version
Problem: npm install command fails
Solutions:
# Clear npm cache
npm cache clean --force
# Reinstall dependencies
rm -r node_modules package-lock.json
npm install
# Try with verbose output
npm install --verbose
# Use different registry
npm config set registry https://registry.npmjs.org/
Problem: Module installed but canât be imported
Solutions:
# Reinstall node_modules
rm -r node_modules
npm install
# Check if module is installed
npm list express
# Verify package.json
type package.json
Problem: EACCES or EPERM errors
Solutions:
# Run as administrator
# Or use npm ci instead of npm install
npm ci
# Or reinstall npm
npm install -g npm@latest
Problem: Canât activate virtual environment
Solutions:
# Check if venv exists
Test-Path venv
# Recreate venv
python -m venv venv
# Activate again
venv\Scripts\activate
# On PowerShell, may need:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
Problem: Module installed globally but not in venv
Solution:
# Make sure venv is activated
venv\Scripts\activate
# Reinstall module
pip install module-name
# Verify it's installed
pip list
pip show module-name
Problem: pip install command fails
Solutions:
# Activate venv first
venv\Scripts\activate
# Upgrade pip
python -m pip install --upgrade pip
# Try again
pip install package-name
# Use requirements file
pip install -r requirements.txt
# Check for errors
pip install --verbose package-name
Problem: âCannot connect to Docker daemonâ
Solution:
Problem: âPort 5432 is already allocatedâ
Solutions:
# Find what's using the port
netstat -ano | findstr :5432
# Kill the process (replace PID)
taskkill /PID 1234 /F
# Or change port in docker-compose.yml
# Or stop Docker containers
docker-compose down
Problem: Docker containers wonât start due to disk space
Solutions:
# Clean up Docker resources
docker system prune
# Remove unused volumes
docker volume prune
# Remove unused images
docker image prune
# Full cleanup (aggressive)
docker system prune -a --volumes
Problem: docker-compose not recognized
Solution:
# Docker Desktop should include docker-compose
# If not, install it:
docker compose --version # Modern Docker uses docker compose (space not dash)
# Or use legacy:
pip install docker-compose
Problem: âFatal: Authentication failedâ
Solutions:
For HTTPS:
For SSH:
# Generate SSH key
ssh-keygen -t ed25519 -C "Kanjanikumar52@gmail.com"
# Add to SSH agent
ssh-add $env:USERPROFILE\.ssh\id_ed25519
# Add public key to GitHub
# GitHub â Settings â SSH and GPG keys â New SSH key
Problem: âYour local changes would be overwrittenâ
Solution:
# Stash your changes
git stash
# Then try the operation again
git pull
# Retrieve changes later
git stash pop
Problem: Accidentally merged wrong branch
Solution:
# Undo the merge (keep changes)
git reset --soft HEAD~1
# Or undo without keeping changes
git reset --hard HEAD~1
# Force push if already pushed
git push origin main --force
Problem: âYou are in âdetached HEADâ stateâ
Solution:
# Create a branch from current state
git branch temp-branch
# Switch to main branch
git checkout main
# Merge temp-branch if needed
git merge temp-branch
Problem: code command not recognized
Solution:
'C:\Users\YourName\AppData\Local\Programs\Microsoft VS Code\Code.exe'Problem: Extension installation fails
Solution:
# Clear VS Code cache
rm $env:APPDATA\Code\User\globalStorage -Recurse
# Reinstall VS Code
# Or install from command line
code --install-extension ms-python.python
Problem: VS Code terminal doesnât work
Solution:
C:\Windows\System32\cmd.exe or C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exeProblem: C++ compiler not found
Solution:
Problem: âgcc/cc/clang not foundâ
Solution:
Problem: npm install takes very long
Solution:
# Install with no optional dependencies
npm install --no-optional
# Use npm ci instead of npm install
npm ci
# Check network: ping registry.npmjs.org
# Change registry
npm config set registry https://registry.npmmirror.com
Problem: Docker containers are slow
Solution:
Problem: Python commands slow
Solution:
# Check what's slow
python -X importtime -c "import module" 2>&1 | tail -20
# Use PyPy for faster execution
# Or optimize imports in startup
# System information
systeminfo
# Check PowerShell version
$PSVersionTable.PSVersion
# Check Windows version
Get-WindowsEdition
# Check Hyper-V enabled
Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V
# Show all paths
$env:PATH -split ';'
# Check if command exists
Get-Command node
# Where is command
where.exe node
# Test connectivity
Test-NetConnection www.google.com
# Test specific port
Test-NetConnection localhost -Port 5432
# DNS resolution
nslookup registry.npmjs.org