saleor / saleor-checkout

Migrated into a monorepo: https://github.com/saleor/react-storefront | The first fully open source and production-ready checkout experience.
https://saleor-checkout.vercel.app
23 stars 25 forks source link

Next.js not loading environment variables in browsers #171

Closed witoszekdev closed 2 years ago

witoszekdev commented 2 years ago

Steps to reproduce the problem

  1. Make sure env variables are defined in .env.local or in the root of monorepo in .env
  2. Run saleor-app-checkout on main brach with pnpm run dev
  3. Visit the app at localhost:3000

Current result

NEXT_PUBLIC_SALEOR_API_URL is not exposed to the client: undefined in browser, OK in node.

Expected behavior

NEXT_PUBLIC_* variables are loaded correctly in browsers

Environment

System:

witoszekdev commented 2 years ago

It's not fully fixed yet, see this: https://github.com/saleor/saleor-checkout/pull/174#issuecomment-1195526709

typeofweb commented 2 years ago

This is a different problem, let's track it in https://github.com/saleor/react-storefront/issues/307