Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minification breaks userapp-angular #11

Open
johanbuys opened this issue Sep 12, 2014 · 11 comments
Open

Minification breaks userapp-angular #11

johanbuys opened this issue Sep 12, 2014 · 11 comments

Comments

@johanbuys
Copy link

Hi,

After a lengthy debugging session on my own app I was able to isolate a problem I was having to the UsesApp-Angular module.

To try and proof that it was not my code I used the example app code from this repo and the same issue occurred.

The Issue: When you minnify and combine js sources angular moans about "Unknown Provider"

My Setup:

Using Gulp I minify and combine the example using gulp-useref and gulp-uglify then start the app using gulp-connect. The App fails with the standard angular provider error:

Uncaught Error: [$injector:unpr] Unknown provider: eProvider <- e
http://errors.angularjs.org/1.2.3/$injector/unpr?p0=eProvider%20%3C-%20e

From my experience this is mostly caused by the injector, which is unable to find the module to inject, when a minifier changes variable names and thus changes the name the injector will search for, usually this is easily solved by using the array syntax when defining controllers, services and the like ie

  angular.controller('contr',['$scope',function($scope){}]);

Unfortunately up to now I am still unable to find the erroneous module.
Been spending a few days on this now. Hope some one can help with this. I will try and continue to find out what the issue might be.

@johanbuys johanbuys changed the title Minification causes breaks userapp-angualr Minification breaks userapp-angualr Sep 12, 2014
@johanbuys johanbuys changed the title Minification breaks userapp-angualr Minification breaks userapp-angular Sep 12, 2014
@madecostore
Copy link

Hi!
Same issue for me with yeoman grunt build.

@ghost
Copy link

ghost commented Jan 16, 2015

Same issue here with gulp. Is this going to be fixed?

@luigiw
Copy link

luigiw commented Mar 1, 2015

I had the same problem, fixed it with below code.

myApp.run(['user',
(user)->
user.init(
appId: '12345'
)
])

viniciussalvati added a commit to viniciussalvati/userapp-angular that referenced this issue Oct 20, 2015
Tested only with `gulp-uglify`, but should work with anything.

Fixes userapp-io#11
@jgangemi
Copy link

jgangemi commented Mar 2, 2016

a year later and crickets

@viniciussalvati
Copy link

@jgangemi my pull request fixes this. All they needed to do was merge it. You can use my fork if you want.

@jgangemi
Copy link

jgangemi commented Mar 2, 2016

yeah - that's what i'm about to do. i'm just annoyed that they can't integrate this into the main line, it's been over a year.

@viniciussalvati
Copy link

The lastest update to the repository was over a year ago. I wonder if they're interacting on the other issues.

Tbh I had one (horrible) experience using UserApp and stopped using it since then, and don't plan on returning.

@jgangemi
Copy link

jgangemi commented Mar 2, 2016

what did you do for an alternative?

@viniciussalvati
Copy link

@jgangemi We started using Auth0 where I work. At least they seem to keep their plugins updated and working

@jgangemi
Copy link

jgangemi commented Mar 3, 2016

@viniciusmelquiades thanks! i came across them yesterday as well and will be dropping userapp, especially after i kept getting constant errors on their website last night trying to do some things.

@viniciussalvati
Copy link

@jgangemi they have some very cool features, even for free users. I'm glad I could help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants