Skip to content

fix frontend process.env, cleanup#44

Merged
martin-mfg merged 16 commits intomasterfrom
vercel-debugging
Feb 7, 2026
Merged

fix frontend process.env, cleanup#44
martin-mfg merged 16 commits intomasterfrom
vercel-debugging

Conversation

@martin-mfg
Copy link
Member

  • fix process.env in frontend
  • remove redundant frontend command "build-trends"
  • remove outdated frontend/README.md
  • add documentation about skipping Vercel build cache

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-stats-extended-backend Ready Ready Preview, Comment Feb 7, 2026 4:43pm
github-stats-extended-frontend Ready Ready Preview, Comment Feb 7, 2026 4:43pm

define: {
// Prevent Vite from injecting process.env like Webpack DefinePlugin
"process.env": {},
"process.env": "window.process.env",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run

pnpm --filter frontend run dev

and open the website in the browser I now get the following error:

env.mjs:8 Uncaught TypeError: Cannot read properties of undefined (reading 'env')
Image

Note

maybe we should setup e2e test (maybe using playwright?) to catch this issues in CI?

Copy link
Member Author

@martin-mfg martin-mfg Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem should be fixed now.

maybe we should setup e2e test (maybe using playwright?) to catch this issues in CI?

Sounds good. If you have experience with this, you're very welcome to create a PR for this. ;)

Copy link

@marcalexiei marcalexiei Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. If you have experience with this, you're very welcome to create a PR for this. ;)

Created a new taks: #46

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem should be fixed now.

I can confirm that the error is no longer present 🎉

docs/deploy.md Outdated
13. optional: add an SQL database; by using e.g. the ["Nile" integration](https://vercel.com/marketplace/nile) or by manually setting the environment variable `POSTGRES_URL`
14. optional: [create your own OAuth App](https://github.com/settings/developers) and set environment variables `OAUTH_REDIRECT_URI`, `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` on Vercel accordingly
15. optional: in addition to the Vercel project based on the `apps/backend` folder, create a second project based on the `apps/frontend` folder. No environment variables needed.
16. optional: if your Vercel deployments fail but after a redeployment without build cache they work, add an environment variable [`VERCEL_FORCE_NO_BUILD_CACHE`](https://vercel.com/docs/deployments/troubleshoot-a-build#managing-build-cache) with value `1` to force Vercel to not use the build cache.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can force pnpm to redownload dependencies on install?

{
  "installCommand": "pnpm install --frozen-lockfile --prefer-offline=false"
}

If this works we can avoid this additional step for users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, better make it simple for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants