File size: 1,034 Bytes
bf54bd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash

echo "=================================="
echo "  ROS Project Runner - Setup"
echo "=================================="
echo ""

# Check if Node.js is installed
if ! command -v node &> /dev/null; then
    echo "❌ Node.js is not installed!"
    echo "Please install Node.js from https://nodejs.org/"
    exit 1
fi

echo "βœ… Node.js version: $(node --version)"
echo "βœ… npm version: $(npm --version)"
echo ""

# Check if we're in the right directory
if [ ! -f "package.json" ]; then
    echo "❌ package.json not found!"
    echo "Please run this script from /home/jatin/ros_full/"
    exit 1
fi

echo "πŸ“¦ Installing dependencies..."
npm install

if [ $? -eq 0 ]; then
    echo ""
    echo "βœ… Installation complete!"
    echo ""
    echo "=================================="
    echo "  To start the server:"
    echo "=================================="
    echo "npm start"
    echo ""
    echo "Then open http://localhost:3000 in your browser"
    echo ""
else
    echo "❌ Installation failed!"
    exit 1
fi