jeudi 6 juillet 2017

EmberJS - throw error on `firebase` implementation

In my emberjs - i am implementing the firebase data base. for that I have changed the environment settings like this: ( please see my comments )

module.exports = function(environment) {
    var ENV = {
        modulePrefix: 'ember-simple-blog-eee6c',
        environment: environment,
        rootURL: '/',
        contentSecurityPolicy: {
            'script-src': "'self' 'unsafe-eval' apis.google.com",
            'frame-src': "'self' http://ift.tt/28WLVjK",
            'connect-src': "'self' http://ift.tt/1Us4oBa http://ift.tt/1ymbsZQ"
        },
        firebase: {
            authDomain: 'ember-simple-blog-eee6c.firebaseapp.com',
            databaseURL: 'http://ift.tt/2tkyV0e',
            projectId: "ember-simple-blog-eee6c",
            storageBucket: "",
            messagingSenderId: "731960884482" //note sure taken from previous app
        },
        locationType: 'auto',
        EmberENV: {
            FEATURES: {
                // Here you can enable experimental features on an ember canary build
                // e.g. 'with-controller': true
            },
            EXTEND_PROTOTYPES: {
                // Prevent Ember Data from overriding Date.parse.
                Date: false
            }
        },

        APP: {
            // Here you can pass flags/options to your application instance
            // when it is created
        },

        contentSecurityPolicy: {
            'font-src': "'self' data: fonts.gstatic.com",
            'style-src': "'self' 'unsafe-inline' fonts.googleapis.com"
        }
    };

    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;
    }

    if (environment === 'test') {
        // Testem prefers this...
        ENV.locationType = 'none';

        // keep test console output quieter
        ENV.APP.LOG_ACTIVE_GENERATION = false;
        ENV.APP.LOG_VIEW_LOOKUPS = false;

        ENV.APP.rootElement = '#ember-testing';
    }

    if (environment === 'production') {

    }

    return ENV;
};

After implemented this config, I am getting error as :

Uncaught Error: Could not find module `ember-simple-blog-eee6c/app` imported from `(require)`

What is wrong here? how to solve this? any one please help me .

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire