Fix vercel env

This commit is contained in:
MartinBraquet
2025-09-21 16:08:29 +02:00
parent e157f500bc
commit 73a0a5ff0b
2 changed files with 12 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ export const LOCAL_WEB_DOMAIN = 'localhost:3000';
export const LOCAL_BACKEND_DOMAIN = 'localhost:8088';
export const IS_GOOGLE_CLOUD = !!process.env.GOOGLE_CLOUD_PROJECT
export const IS_VERCEL = !!process.env.VERCEL
export const IS_VERCEL = !!process.env.NEXT_PUBLIC_VERCEL
export const IS_LOCAL = !IS_GOOGLE_CLOUD && !IS_VERCEL
export const HOSTING_ENV = IS_GOOGLE_CLOUD ? 'Google Cloud' : IS_VERCEL ? 'Vercel' : IS_LOCAL ? 'local' : 'unknown'
console.log(`Running in ${HOSTING_ENV}`, isProd() ? '(prod)' : '(dev)');

View File

@@ -4,6 +4,17 @@ This is the folder for the web application.
### Information
##### Setup
This is the setup for deployment on Vercel, which you only need to do if you create a new platform from scratch, not if you are contributing to Compass
Set up a Vercel account and link it to your GitHub repository.
Add the following environment variables and the ones in `.env` in the Vercel dashboard:
```bash
NEXT_PUBLIC_VERCEL=1
```
##### `next` version
The `next` version is 14.1.0, as we get the following error with 15.1.2 and above when accessing `/[username]` pages on Vercel: