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

Code from dist folder always gives error #3

Closed
BytesFlipper opened this Issue Jul 18, 2013 · 4 comments

Comments

Projects
None yet
3 participants
@BytesFlipper
Copy link

commented Jul 18, 2013

After lineman build command.

Though the build is successful, hosting on a server, I get the following error in Browser's console. I tried to find the problem, but couldn't. Please help.

Uncaught Error: Unknown provider: eProvider <- e <- $http <- AuthenticationService

@davemo

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2013

I'm seeing the same error locally, it looks like it's happening shortly after the manual bootstrap from app/js/bootstrap.js, ng-min does some post processing to add the long-form declaration of angular dependencies.

screen shot 2013-07-18 at 8 56 46 pm

@davemo

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2013

Yeah it seems like there's an issue with ng-min and uglify, I must be missing one of the explicit injections somewhere, but I can't seem to find out what it is. You could try this as a workaround for now to disable argument mangling in Linemans uglify configuration:

Inside of with-lineman/config/application.js add the following:

uglify: {
   options: {
       mangle: false
   }
}

Then rebuild with lineman build and see if that solves your issue @BytesFlipper :)

You won't have as much minification, but at least you'll be unblocked. I'll see what I can do to try and track down the explicit injection I'm missing.

@davemo davemo closed this Dec 31, 2013

@sdeering

This comment has been minimized.

Copy link
Contributor

commented Aug 4, 2014

Nice one Dave this fixed it for me. I guess we'd like to be able to mangle it to increase performance (it increased my app.js size by 100kb). If it's some specific file causing the issue I guess we could use the mangle except clause? https://github.com/gruntjs/grunt-contrib-uglify#reserved-identifiers

@davemo

This comment has been minimized.

Copy link
Owner

commented Aug 4, 2014

Hey @sdeering, the lineman-angular-template is behind on a needed update which replaces grunt-ngmin with the new grunt-ng-annotate. For the time being you could try and utilize the latter to see if it solves your issues. Annotations are one of the main new features coming in Angular 2.0, so it's probably good to familiarize yourself with the new direction anyways :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.