Prerequisites
Before installing ReactFlix, ensure your development environment meets these requirements:Required Software
Node.js (v14 or higher)
Node.js (v14 or higher)
ReactFlix requires Node.js for running the development server and building the application.Check your version:Install Node.js:
- Download from nodejs.org
- Use nvm (Node Version Manager):
nvm install 18 - Recommended: Node.js v18 LTS or higher
npm (v6 or higher)
npm (v6 or higher)
npm is the package manager for JavaScript and comes bundled with Node.js.Check your version:Update npm:
Git (Optional but Recommended)
Git (Optional but Recommended)
Git is needed to clone the repository.Check your version:Install Git:
- Download from git-scm.com
- macOS:
brew install git - Ubuntu:
sudo apt-get install git
System Requirements
- Operating System: Windows 10+, macOS 10.14+, or Linux
- RAM: Minimum 4GB (8GB recommended)
- Disk Space: 500MB for node_modules and build files
- Browser: Modern browser (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)
Installation Methods
- Git Clone (Recommended)
- Download ZIP
Clone from Repository
Verify Installation
Project Structure
After installation, your project directory will look like this:Configuration
Package.json Scripts
ReactFlix includes several npm scripts for different tasks:package.json
Environment Variables
Create a.env file in the root directory for custom configuration:
.env
Environment variables must start with
REACT_APP_ to be accessible in your code (except built-in variables like PORT).Browser Support
ReactFlix is configured to support modern browsers:package.json
Dependency Overview
Core Dependencies
React 19.2.4
React 19.2.4
The latest version of React with:
- Improved concurrent rendering
- Automatic batching
- Enhanced Suspense support
- New hooks and APIs
React Router DOM 7.13.1
React Router DOM 7.13.1
Client-side routing library providing:
- Route definitions with
<Routes>and<Route> - URL parameters (e.g.,
/pelicula/:id) - Navigation with
<Link>components - Programmatic navigation with
useNavigate
React Scripts 5.0.1
React Scripts 5.0.1
Zero-configuration build tooling including:
- Webpack bundler
- Babel transpiler
- ESLint linter
- Jest test runner
- Development server
Testing Dependencies
Development Dependencies
All development dependencies are managed byreact-scripts and include:
- Webpack - Module bundler
- Babel - JavaScript transpiler
- ESLint - Code linting
- PostCSS - CSS processing
- Jest - Testing framework
Verify Installation
Check Installation
Verify all dependencies are installed:You should see all packages from package.json listed.
Run Application
Check Features
Verify these features work:
- Homepage loads with featured movies
- Navigation links work (Movies, Rentals, Purchases)
- Search functionality on /peliculas
- Movie detail pages load
- Trailers play in modal
Troubleshooting
Common Installation Issues
npm install fails
npm install fails
Problem: Errors during
npm installSolutions:Port 3000 already in use
Port 3000 already in use
Problem: “Port 3000 is already in use”Solutions:
Module not found errors
Module not found errors
Problem: “Module not found: Can’t resolve…”Solutions:
npm start shows blank page
npm start shows blank page
Problem: Browser shows blank white pageSolutions:
- Open browser DevTools (F12)
- Check Console for errors
- Verify all files are present in src/
- Check that public/index.html exists
- Clear browser cache and hard reload (Ctrl+Shift+R)
Node version incompatibility
Node version incompatibility
Problem: “The engine ‘node’ is incompatible”Solutions:
Next Steps
Quick Start Guide
Learn the basics and build your first feature
Project Structure
Understand the codebase organization
Component Library
Explore all available components
Customization
Customize ReactFlix for your needs
Additional Resources
Useful Commands Reference
| Command | Description |
|---|---|
npm install | Install all dependencies |
npm start | Start development server |
npm test | Run test suite |
npm run build | Create production build |
npm list | List installed packages |
npm outdated | Check for outdated packages |
npm update | Update packages |
npm audit | Check for security vulnerabilities |
npm audit fix | Fix security vulnerabilities |