Skip to content

Latest commit

 

History

History
239 lines (165 loc) · 6.16 KB

File metadata and controls

239 lines (165 loc) · 6.16 KB

✅ Auto-Start Setup Complete!

Your Local Nexus Controller has been configured with automatic startup capabilities.


🎉 What's Been Fixed

1. Startup Directory Issue - FIXED

  • ✅ No more System32 errors
  • ✅ Batch files automatically navigate to correct directory
  • ✅ All scripts verify project location before running

2. Dependency Installation - ENHANCED

  • ✅ Tries 5 different installation methods automatically
  • ✅ Works with pip, pip3, python -m pip, and --user flags
  • ✅ Shows progress and clear error messages
  • ✅ Handles missing pip module gracefully

3. Auto-Start on Windows Boot - NEW

  • ✅ Double-click setup files in tools folder
  • ✅ Uses Windows Task Scheduler (most reliable method)
  • ✅ Runs from correct directory every time
  • ✅ Easy enable/disable with batch files

🚀 How to Enable Auto-Start RIGHT NOW

Option 1: Double-Click (Easiest) ⭐

  1. Open your project folder
  2. Go to the tools folder
  3. Double-click: ENABLE_AUTO_START.bat
  4. Click "Yes" when asked for administrator access
  5. Done!

Option 2: PowerShell

# From your project root
.\tools\setup_auto_start.ps1

What Happens Next?

After enabling auto-start:

  • ✅ Controller automatically starts when you log into Windows
  • ✅ Runs npm run dev from the correct directory
  • ✅ Installs dependencies if needed
  • ✅ Opens dashboard in your browser
  • ✅ Runs minimized in background

📋 Files Created

In tools/ folder:

Easy Setup Files:

  • ENABLE_AUTO_START.bat - Enable auto-start (double-click)
  • DISABLE_AUTO_START.bat - Disable auto-start (double-click)

PowerShell Scripts:

  • setup_auto_start.ps1 - Auto-start configuration
  • disable_auto_start.ps1 - Remove auto-start
  • start_on_boot.vbs - VBScript launcher (alternative)

Auto-Generated:

  • start_nexus_on_boot.bat - Created by setup script

Documentation Files:

  • AUTO_START_GUIDE.md - Complete auto-start guide with troubleshooting
  • tools/README.md - Tools directory reference
  • WINDOWS_SETUP.md - Updated with auto-start info
  • README.md - Updated with auto-start section

🔧 Enhanced Features

Smart Dependency Installation

The __main__.py file now tries these methods in order:

  1. pip3 install -r requirements.txt
  2. pip install -r requirements.txt
  3. python -m pip install -r requirements.txt
  4. pip3 install --user -r requirements.txt
  5. pip install --user -r requirements.txt

Result: Dependencies will install successfully on almost any Windows Python setup!

Directory-Aware Startup

All startup scripts:

  • ✅ Detect their own location
  • ✅ Navigate to project root
  • ✅ Verify project files exist
  • ✅ Show clear error messages if something's wrong

Simplified package.json

Removed problematic predev and postinstall hooks that caused errors. The application now handles everything internally.


📖 Quick Reference

Task Command
Enable auto-start Double-click tools/ENABLE_AUTO_START.bat
Disable auto-start Double-click tools/DISABLE_AUTO_START.bat
Start manually Double-click start.bat or run npm run dev
Check if enabled Open Task Scheduler → Find "Local Nexus Controller"
View logs Open dashboard → Services → View logs

🧪 Testing

Test 1: Manual Start

cd C:\path\to\local-nexus-controller
start.bat

Expected: Dashboard opens at http://localhost:5010

Test 2: Verify Auto-Start Setup

Get-ScheduledTask -TaskName "Local Nexus Controller"

Expected: Shows task details with Status = "Ready"

Test 3: Test Auto-Start Now

Start-ScheduledTask -TaskName "Local Nexus Controller"

Expected: Controller starts and dashboard opens

Test 4: Full Reboot Test

  1. Enable auto-start (if not already)
  2. Log out of Windows
  3. Log back in
  4. Controller should start automatically
  5. Dashboard should open in browser

⚠️ Troubleshooting

"EPERM: operation not permitted"

Cause: Running from wrong directory (System32)

Fix: Use start.bat or tools/ENABLE_AUTO_START.bat instead of npm run dev directly

Auto-Start Not Working

Check these:

  1. Is the task created? Open Task Scheduler and look for "Local Nexus Controller"
  2. Is Python in your PATH? Run python --version in cmd
  3. Is Node/npm in your PATH? Run npm --version in cmd
  4. Check task history in Task Scheduler for errors

Solutions:

  • See AUTO_START_GUIDE.md for detailed troubleshooting
  • Check Windows Event Viewer for Task Scheduler errors
  • Try running tools/start_nexus_on_boot.bat manually to see errors

Dependencies Won't Install

The app tries 5 methods automatically. If all fail:

Manual install:

cd C:\path\to\local-nexus-controller
pip install -r requirements.txt

Or try:

python -m pip install --user -r requirements.txt

📚 Documentation

All documentation is up-to-date:


✨ What You Can Do Now

  1. Double-click tools/ENABLE_AUTO_START.bat to enable auto-start
  2. Restart your computer to test it works
  3. Forget about manual startup - it just works!

🎯 Summary

Before:

  • ❌ Had to manually cd to correct directory
  • pip module errors
  • ❌ Vite errors from System32
  • ❌ Manual startup every reboot

After:

  • ✅ Automatic directory detection
  • ✅ Smart dependency installation
  • ✅ No more System32 errors
  • ✅ Auto-start on Windows boot

Everything is now fixed and ready to use!


🙏 Next Steps

  1. Enable auto-start: Double-click tools/ENABLE_AUTO_START.bat
  2. Test it: Log out and back in (or restart)
  3. Enjoy: Never manually start the controller again!

If you have any issues, check AUTO_START_GUIDE.md for troubleshooting.


You're all set! The controller will now start automatically every time you log into Windows. 🎉