Next.js Discord

Discord Forum

Turborepo basic example: 'process' is not defined.

Unanswered
Yellow-breasted Bunting posted this in #help-forum
Open in Discord
Yellow-breasted BuntingOP
Hey I just span up the basic nextjs turborepo example
https://github.com/vercel/turbo/tree/main/examples/basic

Added an environment variable to .env.local to one of the app dirs and referenced in the home page.tsx

const envTest = process.env.NEXT_PUBLIC_TEST;

Go to build on vercel...

./app/page.tsx
Error: 'process' is not defined. no-undef


Any ideas what I'm doing wrong here? 🙏

2 Replies

Yellow-breasted BuntingOP
https://turbo.build/pack/docs/features/environment-variables#processenv it sounds simple. but maybe their eslint setup is wrong. but its more likely im missing something right
Yellow-breasted BuntingOP