Skip to content

dist/scripts/vendor-######.js file is not compiling/minifying/uglifying correctly with out-of-the-box build #638

@jahammo2

Description

@jahammo2
The dist build isn't working right out-of-the-box.
Here are my options I choose after $ yo gulp-angular :
  • 1.4.0 (angular)
  • none (modules)
  • 2.x (jquery)
  • ngResource
  • ngRoute
  • BootStrap
  • Angular UI (bootstrap)
  • Sass (Node)
  • CoffeeScript
  • Jade

Once it's done building, and without making any changes whatsoever, I run
$ gulp serve:dist

and the build doesn't work. Specifically, the uglified version of code that ends up in dist/scripts/vendor-#####.js, which causes the whole build to not work.

Here is the error I'm getting in the console:
Error: [$injector:unpr] Unknown provider: tProvider <- t http://errors.angularjs.org/1.4.1/$injector/unpr?p0=tProvider%20%3C-%20t at http://localhost:3002/scripts/vendor-c7c85932a2.js:32:380 at http://localhost:3002/scripts/vendor-c7c85932a2.js:32:19631 at Object.r [as get] (http://localhost:3002/scripts/vendor-c7c85932a2.js:32:18801) at http://localhost:3002/scripts/vendor-c7c85932a2.js:32:19728 at r (http://localhost:3002/scripts/vendor-c7c85932a2.js:32:18801) at Object.i [as invoke] (http://localhost:3002/scripts/vendor-c7c85932a2.js:32:19138) at f.instance (http://localhost:3002/scripts/vendor-c7c85932a2.js:33:9293) at g (http://localhost:3002/scripts/vendor-c7c85932a2.js:32:30984) at s (http://localhost:3002/scripts/vendor-c7c85932a2.js:32:27443) at s (http://localhost:3002/scripts/vendor-c7c85932a2.js:32:27466) <div ng-view="" class="ng-scope">(anonymous function) @ vendor-c7c85932a2.js:33
screen shot 2015-06-26 at 2 44 54 pm

My guess is the problem resides in the CoffeeScript choice. Because if I choose ES6 (Babel...), I don't have this problem straight out-of-the-box.

I do not get this problem if I just run
$ gulp serve
or if I comment out
.pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify'))
in gulp/build.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions