0

so i am implementing an auth page with typescript React and firebase. I have stored my firebase credentials in my env file and i have referenced it using the process.env but everytime i try to visit my auth page i get the error process is not defined

import { initializeApp } from "firebase/app";
// import { getAnalytics } from "firebase/analytics";
require('dotenv').config();
import * as fs from 'fs'

import { getAuth } from "firebase/auth";

export const firebaseConfig = {
  apiKey:process.env.REACT_APP_apiKey,
  authDomain: process.env.REACT_APP_authDomain, 
  projectId: process.env.REACT_APP_projectId,
  storageBucket: process.env.REACT_APP_storageBucket, 
  messagingSenderId: process.env.REACT_APP_messagingSenderId,
  appId: process.env.REACT_APP_appId, 
  measurementId: process.env.REACT_APP_measurementId,
};

// Initialize Firebase
 initializeApp(firebaseConfig);
// getAnalytics(app);

export const auth = getAuth();

, attached below is my firebase file.

Lanlokun
  • 1
  • 1

0 Answers0