-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_nodejs.sh
More file actions
executable file
·53 lines (50 loc) · 1.74 KB
/
Copy pathsetup_nodejs.sh
File metadata and controls
executable file
·53 lines (50 loc) · 1.74 KB
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
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Node.js Installation Guide for macOS
# Created: 2025-12-07
echo "=================================================="
echo "Node.js Installation Guide for Simple378"
echo "=================================================="
echo ""
# Check if Node.js is already installed
if command -v node &> /dev/null; then
echo "✅ Node.js is already installed!"
node --version
npm --version
echo ""
echo "You can skip to Step 2 in the installation guide."
exit 0
fi
echo "❌ Node.js is not installed."
echo ""
echo "Please choose an installation method:"
echo ""
echo "OPTION 1: Install via Official Installer (RECOMMENDED)"
echo " 1. Visit: https://nodejs.org/"
echo " 2. Download the LTS version (Long Term Support)"
echo " 3. Run the .pkg installer"
echo " 4. Follow the installation wizard"
echo " 5. Restart your terminal"
echo " 6. Run: node --version"
echo ""
echo "OPTION 2: Install Homebrew first, then Node.js"
echo " 1. Install Homebrew:"
echo " /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
echo " 2. Then install Node.js:"
echo " brew install node"
echo ""
echo "OPTION 3: Install via NVM (Node Version Manager)"
echo " 1. Install NVM:"
echo " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash"
echo " 2. Restart terminal, then:"
echo " nvm install --lts"
echo " nvm use --lts"
echo ""
echo "=================================================="
echo "After installing Node.js, run this to verify:"
echo " node --version"
echo " npm --version"
echo ""
echo "Then proceed to the next setup script:"
echo " cd /Users/Arief/Desktop/Simple378"
echo " ./setup_frontend.sh"
echo "=================================================="