@@ -179,7 +179,10 @@ For more security information, see [docs/secrets.md](docs/secrets.md) and [SECUR
179179### Prerequisites
180180
181181- ** Python 3.9+** (check with ` python3 --version ` )
182- - ** Node.js 18+** and npm (check with ` node --version ` and ` npm --version ` )
182+ - ** Node.js 20.0.0+** (LTS recommended) and npm (check with ` node --version ` and ` npm --version ` )
183+ - ** Minimum** : Node.js 18.17.0+ (required for ` node:path ` protocol support)
184+ - ** Recommended** : Node.js 20.x LTS for best compatibility
185+ - ** Note** : Node.js 18.0.0 - 18.16.x will fail with ` Cannot find module 'node:path' ` error
183186- ** Docker** and Docker Compose
184187- ** Git** (to clone the repository)
185188- ** PostgreSQL client** (` psql ` ) - Required for running database migrations
@@ -197,19 +200,22 @@ For the fastest local development setup:
197200git clone https://github.com/T-DevH/Multi-Agent-Intelligent-Warehouse.git
198201cd Multi-Agent-Intelligent-Warehouse
199202
200- # 2. Setup environment
203+ # 2. Verify Node.js version (recommended before setup)
204+ ./scripts/setup/check_node_version.sh
205+
206+ # 3. Setup environment
201207./scripts/setup/setup_environment.sh
202208
203- # 3 . Configure environment variables (REQUIRED before starting services)
209+ # 4 . Configure environment variables (REQUIRED before starting services)
204210# Create .env file for Docker Compose (recommended location)
205211cp .env.example deploy/compose/.env
206212# Or create in project root: cp .env.example .env
207213# Edit with your values: nano deploy/compose/.env
208214
209- # 4 . Start infrastructure services
215+ # 5 . Start infrastructure services
210216./scripts/setup/dev_up.sh
211217
212- # 5 . Run database migrations
218+ # 6 . Run database migrations
213219source env/bin/activate
214220
215221# Option A: Using psql (requires PostgreSQL client installed)
@@ -223,19 +229,19 @@ PGPASSWORD=${POSTGRES_PASSWORD:-changeme} psql -h localhost -p 5435 -U warehouse
223229# docker-compose -f deploy/compose/docker-compose.dev.yaml exec -T timescaledb psql -U warehouse -d warehouse < data/postgres/000_schema.sql
224230# (Repeat for other schema files)
225231
226- # 6 . Create default users
232+ # 7 . Create default users
227233python scripts/setup/create_default_users.py
228234
229- # 7 . Generate demo data (optional but recommended)
235+ # 8 . Generate demo data (optional but recommended)
230236python scripts/data/quick_demo_data.py
231237
232- # 8 . Generate historical demand data for forecasting (optional, required for Forecasting page)
238+ # 9 . Generate historical demand data for forecasting (optional, required for Forecasting page)
233239python scripts/data/generate_historical_demand.py
234240
235- # 9 . Start API server
241+ # 10 . Start API server
236242./scripts/start_server.sh
237243
238- # 10 . Start frontend (in another terminal)
244+ # 11 . Start frontend (in another terminal)
239245cd src/ui/web
240246npm install
241247npm start
@@ -289,6 +295,16 @@ python setup_nvidia_api.py
289295
290296### Troubleshooting
291297
298+ ** Node.js Version Issues:**
299+ - ** Error: "Cannot find module 'node: path '"** : Your Node.js version is too old
300+ - Check version: ` node --version `
301+ - Minimum required: Node.js 18.17.0+
302+ - Recommended: Node.js 20.x LTS
303+ - Run version check: ` ./scripts/setup/check_node_version.sh `
304+ - Upgrade: ` nvm install 20 && nvm use 20 ` (if using nvm)
305+ - Or download from: https://nodejs.org/
306+ - After upgrading, clear and reinstall: ` cd src/ui/web && rm -rf node_modules package-lock.json && npm install `
307+
292308** Database Connection Issues:**
293309- Ensure Docker containers are running: ` docker ps `
294310- Check TimescaleDB logs: ` docker logs wosa-timescaledb `
@@ -300,6 +316,11 @@ python setup_nvidia_api.py
300316- Use the startup script: ` ./scripts/start_server.sh `
301317- See [ DEPLOYMENT.md] ( DEPLOYMENT.md ) troubleshooting section
302318
319+ ** Frontend Build Issues:**
320+ - Verify Node.js version: ` ./scripts/setup/check_node_version.sh `
321+ - Clear node_modules: ` cd src/ui/web && rm -rf node_modules package-lock.json && npm install `
322+ - Check for port conflicts: Ensure port 3001 is available
323+
303324** For more help:** See [ DEPLOYMENT.md] ( DEPLOYMENT.md ) for detailed troubleshooting or open an issue on GitHub.
304325
305326## Multi-Agent System
0 commit comments