Jon-Biz / FireUser

A Firebase user management module for Angularjs
61 stars 10 forks source link

Unknown provider #4

Closed contrastlogic closed 10 years ago

contrastlogic commented 10 years ago

Followed the instructions listed but running a view with FireUserLoginForm directive spits out this error in console:

Error: [$injector:unpr] Unknown provider: $firebaseAuthProvider <- $firebaseAuth <- $fireUser http://errors.angularjs.org/1.2.6/$injector/unpr?p0=NaNirebaseAuthProvider%20%3C-%20%24firebaseAuth%20%3C-%20%24fireUser

thataustin commented 10 years ago

could you post any of your code? I think it would be helpful to see the markup and any controllers if you can.

contrastlogic commented 10 years ago

Pretty basic setup

'use strict';

var app = angular.module('sandboxApp', ['ngCookies','ngResource','ngSanitize','ngRoute', 'fireUser'])
  .config(function ($routeProvider) {
    $routeProvider
      .when('/', {
        templateUrl: 'views/main.html',
        controller: 'MainCtrl'
      })
      .when('/foo', {
        templateUrl: 'views/foo.html',
        controller: 'FooCtrl'
      })
      .otherwise({
        redirectTo: '/'
      });

    //$locationProvider.html5Mode(true);
  });

/**
* FireUser
*
* FireUser - Firebase user management
*/
angular.module('fireUser').value('FireUserConfig', {
  FBurl: 'https://xxxxx.firebaseio.com'
});

app.controller('MainCtrl', ['$scope', function ($scope) {

    $scope.awesomeThings = [
      'HTML5 Boilerplate',
      'AngularJS',
      'Karma'
    ];

}]);

app.controller('FooCtrl', ['$scope', '$fireUser', function ($scope, $fireUser) {
    $scope.msg = 'testing';
}]);

-- foo.html

<p>This is the foo view.</p>
<fireuserloginform />
thataustin commented 10 years ago

are you using bower to install dependencies? I'd need to see if you have the correct deps included (angularFire, firebase, etc...) Also, if you want the buttons to show up, you'll need to include font awesome and twitter bootstrap as the instructions say.

Jon-Biz commented 10 years ago

@contrastlogic - could you provide more information on the problem? Is it still occurring? Otherwise we are going to need to close this.

contrastlogic commented 10 years ago

no resolution. not sure what more info you need. I'm using the default yeoman angular setup, all libraries included and my code was posted.

Jason

On Wed, Jan 29, 2014 at 2:10 PM, Jon-Biz notifications@github.com wrote:

@contrastlogic https://github.com/contrastlogic - could you provide more information on the problem? Is it still occurring? Otherwise we are going to need to close this.

Reply to this email directly or view it on GitHubhttps://github.com/Jon-Biz/FireUser/issues/4#issuecomment-33618607 .

thataustin commented 10 years ago

Ah, I think I found the problem. If you are using AngularFire version 0.6.0, then $firebaseAuth won't be defined. Can you check which version of that you are using? You should be able to look at the comments at the top of bower_components/angularfire/angularfire.js to find out.

We are currently working on upgrading to the latest version of angularfire (it's new), but in the meantime, an easy fix might be to bower uninstall angularfire, adjust the version in bower.json to be "~0.5.0", then bower install

Jon-Biz commented 10 years ago

The current, master branch of FireUser has been updated to use AngularFire 0.6

However, there are significant other changes as well, that may or may not effect your project as described here. I'm going to build your project as described here tomorrow with the latest version of FireUser (0.2.1) and see if can replicate/resolve your issue.

contrastlogic commented 10 years ago

Version issue was correct. Just did a fresh Yeoman reinstall and bower dependancies. Still ran into an issue with AngularFire 0.6.0, but 0.5.0 appears to be working.

thataustin commented 10 years ago

@contrastlogic, we just updated to fireuser to v0.3.0, which uses angular fire 0.6.0. Feel free to try out the new version. Either way, would you mind closing this issue if you've worked this out?

4ware commented 10 years ago

Hi! I'm trying to user FireUser with the latest angularfire v0.8.0 and run into the same error.

richard457 commented 8 years ago

Did you inject firebase dependency on module if so then check the order of file because it matter too! my case I hade ionicbundle after angularfire I guess you know firebase, my module was var starter = angular.module('starter', ['ionic','']) corrected it like this: var starter = angular.module('starter', ['ionic','firebase']) Thanks.