The Local Nexus Controller now has automatic dependency installation built in. Just run:
npm run devIf dependencies are missing, they will be automatically installed on first run.
When you run npm run dev, the application checks if uvicorn is installed.
If dependencies are missing:
- The application automatically runs
pip install -r requirements.txt - Tries
--break-system-packagesflag first - Falls back to
--userflag if needed - Shows clear messages about what's happening
If dependencies were just installed, you'll see:
✓ Dependencies installed successfully
Please restart the application.
Just run npm run dev again and it will start normally.
npm run devFeatures:
- Automatic dependency installation via
predevhook - Works in any environment (Bolt.new, local, Cursor)
- Shows clear error messages
python3 -m local_nexus_controllerFeatures:
- Checks for uvicorn on startup
- Auto-installs dependencies if missing
- Shows installation progress
./start.shFeatures:
- Checks prerequisites before starting
- Validates Python version
- Ensures data directories exist
When you reboot your system or the Bolt.new environment refreshes:
- Dependencies Reset: Python packages may need to be reinstalled
- Auto-Recovery: The application detects this and installs them automatically
- No Manual Steps: Just run
npm run devas usual
The first startup after a reboot will take a bit longer while dependencies install, but subsequent starts will be instant.
This is now handled automatically! The application will:
- Detect the missing module
- Install all dependencies
- Prompt you to restart
If auto-install fails, you'll see clear instructions for manual installation.
If automatic installation doesn't work:
# Try method 1 (usually works)
python3 -m pip install --break-system-packages -r requirements.txt
# Or method 2 (user install)
python3 -m pip install --user -r requirements.txt
# Or method 3 (simple)
pip3 install -r requirements.txtCheck which Python is being used:
which python3
python3 --version
python3 -c "import uvicorn; print('✓ uvicorn found')"If uvicorn is found, try:
python3 -m uvicorn local_nexus_controller.main:app --host 0.0.0.0 --port 5010- Environment may reset between sessions
- Dependencies auto-install on first run after reset
- Takes 30-60 seconds for first startup
- Normal after that
- Dependencies persist between runs
- Only installs once unless you delete them
- Fastest startup method
- Uses your local Python environment
- Dependencies persist
- May need to select correct Python interpreter
The npm run build command:
- Ensures dependencies are installed
- Verifies the application can import correctly
- Shows
✓ Application readywhen successful
npm run buildUse this to verify everything is set up correctly without starting the server.
From requirements.txt:
fastapi- Web frameworkuvicorn[standard]- ASGI serversqlmodel- Database ORMSQLAlchemy- Database toolkitjinja2- Template enginepython-dotenv- Environment variablespsutil- Process management
Total install size: ~50MB
Set in .env:
LOCAL_NEXUS_OPEN_BROWSER=falseSet in .env:
LOCAL_NEXUS_PORT=8080Then start with:
npm run devSet in .env:
LOCAL_NEXUS_RELOAD=falseWhen everything works correctly, you'll see:
✓ Database directory ready: /path/to/data
✓ Database URL: sqlite:///path/to/data/local_nexus.db
✓ Database tables created/verified
INFO: Will watch for changes in these directories: ['/path/to/local_nexus_controller']
INFO: Uvicorn running on http://0.0.0.0:5010 (Press CTRL+C to quit)
INFO: Started reloader process [PID] using WatchFiles
INFO: Started server process [PID]
INFO: Waiting for application startup.
INFO: Application startup complete.
Then visit: http://localhost:5010
If you continue to experience issues:
- Check
TROUBLESHOOTING.mdfor detailed debugging steps - Run the system test:
python3 test_system.py - Check the error logs in
data/logs/
For manual control, see:
ERROR_FIXES.md- List of all fixes appliedAUDIT_REPORT.md- Security and error handling auditQUICKSTART.md- Quick reference guide