Firebase Missing App configuration value: "projectId" (installations/missing-app-config-values) in ReactJs using travis

Viewed 769

firebase react app deployment works fine when deployed using the command line. However, I am getting the following error when deployed using Travis. enter image description here

Below are my configuration files.

.travis.yml

language: node_js
node_js:
   - 12.1.0
warnings_are_errors: false
install:
  - npm install
script:
  - npm run build
deploy:
   provider: firebase
   skip_cleanup: true
   true:
      branch: main
token:
    secure: ****************************

env: global: secure: *****************************

firebase.json

{
"hosting": {
    "site": "********",
    "public": "build",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

.env

API_KEY=''
AUTH_DOMAIN=''
PROJECT_ID=''
FIREBASE_STORAGE_BUCKET=''
FIREBASE_MESSAGING_SENDER_ID=''
FIREBASE_APP_ID=''
FIREBASE_DATABASE_URL=''

export const firebaseConfig = {
  apiKey: process.env.API_KEY,
  authDomain: process.env.AUTH_DOMAIN,
  projectId: process.env.PROJECT_ID,
  storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
  messagingSenderId: 
  process.env.FIREBASE_MESSAGING_SENDER_ID,
  appId: process.env.FIREBASE_APP_ID,
  measurementId: process.env.measurementId
};

  firebaseApp.initializeApp(firebaseConfig);
0 Answers
Related