I am getting the following error in my Angular app after adding gulp babel to my gulp file. I need this to transpile and minify my ES6:
Cannot set property '0' of undefined
I'm thinking angular-file-saver doesn't like to babelfication.
Causing these errors:
angular.js:33 Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:nomod] Module 'app' is not available!
Yet I can see the module being loaded client side:
Gulp Task: Note: this error only started occuring when I started piping through babel. If I remove babelminify, it produces the same error.
gulp.task('scripts-dev', () => {
return gulp.src(paths.vendorJavascript.concat(paths.appJavascript, paths.appTemplates))
.pipe(plugins.if(/html$/, buildTemplates()))
.pipe(babel({
presets: [['es2015', {modules: false}]]
}))
//.pipe(babelminify())
.pipe(plugins.sourcemaps.init())
.pipe(plugins.concat('app.js'))
.pipe(plugins.sourcemaps.write('.'))
.pipe(gulp.dest(paths.tmpJavascript))
.pipe(plugins.connect.reload());
});
This error occurs even without minifying taking place


ng-strict-dito yourng-appelement in the HTML to have angular generate errors relating to any code that is not minification safe. Beyond that, it's possible something isn't right with your gulp task that is causing some of your scripts to not be included.... - Claies