Cannot deploy ember app in Firebase

417 views Asked by At

I am unable to deploy my ember application in Firebase. I can only see the welcome page of Firebase hosting:

You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!

I have installed the EmberFire add-on, as well as the Firebase tool.

My config file looks like this:

    module.exports = function(environment) {
      var ENV = {
        modulePrefix: 'sample',
        environment: environment,
        rootURL: '/',
        locationType: 'auto',
    
        firebase : {
        apiKey: 'xxxxxx',
        authDomain: 'xxxxx',
        databaseURL: 'xxxx',
        storageBucket: 'xxxxx',
        messagingSenderId: 'xxxxx'
    }, 
        EmberENV: {
          FEATURES: {
            // Here you can enable experimental features on an ember canary build
            // e.g. 'with-controller': true
          }
        },
    
        APP: {
          // Here you can pass flags/options to your application instance
          // when it is created
        }
      };
      
      if (environment === 'development') {
        // ENV.APP.LOG_RESOLVER = true;
        ENV.APP.LOG_ACTIVE_GENERATION = true;
        ENV.APP.LOG_TRANSITIONS = true;
        ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
        ENV.APP.

LOG_VIEW_LOOKUPS = true;
  }

Firebase.json:

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "dist",
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

I have built the app and deployed using following commands:

ember build --prod

firebase login

firebase init

firebase deploy

Thanks in advance :-)

1

There are 1 answers

0
Falke On BEST ANSWER

When you initialise your ember.js app with firebase init command for the first time, you will be prompted that

? File dist/index.html already exists. Overwrite? (y/N) 

respond with No.
Responding with yes will allow the default firebase hosting welcome page override your ember app index.html file, which is why you are still greeted with the firebase hosting welcome page.