Check out example codes for "firebase not found in envirorment.ts file angular". It will help you in understanding the concepts better.

Code Example 1

// When you run ng build --prod angular-cli will use the file
// and your files environment variable doesn't have the firebase
// field hence you are getting the exception.

export const environment = {
  production: true,
  firebase: {
    apiKey: "...",
    authDomain: "",
    databaseURL: "",
    projectId: "project",
    storageBucket: "",
    messagingSenderId: "..."

Learn ReactJs, React Native from