This document provides step-by-step instructions for deploying your Next.js app to Vercel using the Vercel CLI.
- Node.js installed: Ensure Node.js is installed on your system.
Install Vercel CLI globally using npm or pnpm:
npm install -g vercel
# OR if using pnpm
pnpm add -g vercel
Log in to your Vercel account:
vercel login
Follow the on-screen instructions to authenticate your account.
Navigate to the root directory of your Next.js app:
cd packages/react-app
To deploy your Celo Composer app using Vercel CLI, run:
vercel
Note
First-Time Deployment:
- The CLI will ask several questions, including project scope, project name, and framework detection.
Subsequent Deployments:
- Run vercel to deploy the latest changes without additional configuration.
After deployment, you’ll receive a preview deployment URL:
https://<project-name>.vercel.app
Important
Important: This preview deployment is only accessible to the authenticated user (the Vercel account owner). To make your app publicly accessible, you need to deploy to production.
To make the app publicly accessible, deploy it to production:
vercel deploy --prod
This command creates a production deployment accessible to everyone.
If your app uses environment variables, configure them in Vercel:
- Go to the Vercel Dashboard.
- Select your project.
- Go to Settings > Environment Variables.
- Add variables for Development, Preview, and Production environments.
Alternatively, use Vercel CLI:
vercel env add <variable-name> <variable-value>
Whenever you make changes to your code, update the deployment:
- Preview deployment:
vercel
- Production deployment:
vercel --prod