2017-07-06 3 views
1

私のemberjsで - firebaseデータベースを実装しています。 (私のコメントを参照してください)として、私はエラーを取得しています。この設定を実装した後EmberJS - `firebase`実装でエラーをスローする

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' https://*.firebaseapp.com", 
      'connect-src': "'self' wss://*.firebaseio.com https://*.googleapis.com" 
     }, 
     firebase: { 
      authDomain: 'ember-simple-blog-eee6c.firebaseapp.com', 
      databaseURL: 'https://ember-simple-blog-eee6c.firebaseio.com/', 
      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; 
}; 

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

ここに何が問題であることのために私はこのようなenvironment設定を変更しましたか?これを解決するには?いずれかが私を助けてください。

ありがとうございます。

+0

なぜContentSecurityPolicyの複製がありますか? – Cameron

答えて

1

あなたの火器ベースはあなたのエラーとは何の関係もないと思われます。 module-prefixに間違った名前を付けると、自分のアプリでエラーを再現することができます。あなたのemberプロジェクトではなくfirebaseプロジェクトの後にmodule-prefixという名前を付けることは可能ですか?もしそうなら、それが理由かもしれないと私は思う。 Emberプロジェクトが入っているフォルダと同じ名前を持つmodulePrefixが必要だと思います。

+1

はい、それは本当です。非常にあなたのおかげで! – 3gwebtrain

+0

@ 3gwebtrainそれを聞いてうれしい! – Cameron

+0

私はEmberを学び始めるばかりです。あなたは良いチュートリアルをお勧めしますか? – 3gwebtrain

関連する問題