process undefined when accessing env variables
when trying to access an environment variable setup in .env from login.tsx I get the following error
process undefined
process undefined
REACT_APP_. So, if you're trying to access a variable like API_KEY, you should rename it to REACT_APP_API_KEY in your .env file.dotenv package. You can install it with npm install dotenv, and then at the top of your file, before any other imports, add the following lines:.env file into process.env. (source (https://github.com/refinedev/refine/issues/4039))process.env.REACT_APP_API_KEY (or whatever you named your variable)..env file, you need to restart your development server to see the changes.API_KEYREACT_APP_API_KEYnpm install dotenvprocess.env.REACT_APP_API_KEYimport * as dotenv from 'dotenv';
dotenv.config();