Installation Guide
This guide provides detailed instructions for installing FreshJuice DEV and setting up your development environment.Prerequisites
Before installing FreshJuice DEV, ensure you have the following installed and configured:Required Software
Node.js (v22.0.0 or newer)
FreshJuice DEV requires Node.js version 22.0.0 or higher.Check your Node.js version:Install or update Node.js:Download the latest version from nodejs.org or use a version manager:
We recommend using nvm (Node Version Manager) to manage Node.js versions.
HubSpot CMS CLI
The HubSpot CLI is required for local development and deployment.Install the HubSpot CLI globally:Verify installation:
See the HubSpot CLI documentation for more details.
HubSpot Account
You need access to a HubSpot account with CMS Hub permissions.
- CMS Hub Starter or higher is required
- Ensure you have Design Manager access
- Have your Portal ID ready
Git (Optional but Recommended)
Git is needed to clone the repository and manage version control.Check if Git is installed:Install Git:Download from git-scm.com or use your package manager:
Installation Steps
1. Clone the Repository
Clone the FreshJuice DEV repository to your local machine:2. Install Dependencies
Install all required npm packages:- Tailwind CSS v4 – For utility-first styling
- Alpine.js v3 – For reactive components
- esbuild – For fast JavaScript bundling
- Development tools – Husky, npm-run-all, rimraf, and more
The installation process may take a few minutes depending on your internet connection.
3. Prepare Development Environment
Install Husky git hooks for code quality:4. Authenticate with HubSpot
Connect the HubSpot CLI to your HubSpot account:- Choose OAuth or Personal Access Key authentication
- Enter your Portal ID (found in HubSpot settings)
- Complete authentication in your browser
5. Configure Upload Destination (Optional)
By default, the theme uploads to/FreshJuiceDEV in your HubSpot portal. To change this:
- Open
package.json - Find the
upload:hubspotandwatch:hubspotscripts - Change
/FreshJuiceDEVto your preferred destination
Verify Installation
Ensure everything is set up correctly:Test build process
- Clean temporary directories
- Bundle JavaScript files
- Compile Tailwind CSS
- Create a distribution ZIP
If the build completes without errors, your environment is properly configured.
Development Workflow
Once installed, you have several commands available:Local Development
Start the development server with hot-reload:- Tailwind CSS watcher – Rebuilds CSS on changes
- JavaScript bundler – Rebuilds JS on changes
- HubSpot file watcher – Auto-uploads to HubSpot
Leave this running while you develop. Changes will automatically sync to HubSpot.
Production Build
Build optimized files for production:- Minified CSS in
theme/css/tailwind.css - Bundled JavaScript in
theme/js/main.js - Distribution ZIP in
_dist/directory
Manual Upload
Upload the theme without watching:Individual Build Commands
You can also run build steps individually:Troubleshooting
Node.js Version Errors
Problem:Error: The engine "node" is incompatible with this module
Solution: Upgrade to Node.js v22.0.0 or higher:
HubSpot Authentication Issues
Problem:Error: Unauthorized or No valid authentication found
Solution: Re-authenticate with HubSpot:
Build Failures
Problem:npm run build fails with errors
Solutions:
-
Clear npm cache and reinstall:
-
Check for syntax errors in source files:
-
Ensure all dependencies are installed:
Upload Errors
Problem: Files not uploading to HubSpot Solutions:-
Verify authentication:
- Check portal permissions (need Design Manager access)
- Verify the upload path exists or create it manually in HubSpot
-
Try uploading manually:
Next Steps
Now that FreshJuice DEV is installed, you’re ready to start developing:Quick Start
Follow the quick start guide to create your first page.
Project Structure
Learn about the theme’s file organization.
Configuration
Customize theme settings and behavior.
Development Guide
Deep dive into theme development workflows.