You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue while running gulp templatecache. I have installed the dependencies gulp-angular-templatecache and gulp-minify-html. I have also added the information in the gulp.config.js file.
➜ pluralsight-gulp git:(master) ✗ gulp templatecache
[10:25:39] Using gulpfile ~/sites/pluralsight-gulp/gulpfile.js
[10:25:39] Starting 'clean-code'...
[10:25:39] Cleaning: ./.tmp//*.js,./build//.html,./build/js/__/.js
[10:25:39] Finished 'clean-code' after 82 ms
[10:25:39] Starting 'templatecache'...
[10:25:39] Creating an AngularJS $templateCache
[10:25:39] 'templatecache' errored after 7.49 ms
[10:25:39] TypeError: undefined is not a function
at Gulp. (/Users/malikdixon1/sites/pluralsight-gulp/gulpfile.js:110:19)
at module.exports (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:279:18
at finish (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/index.js:54:4
at module.exports (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/node_modules/each-async/index.js:22:3)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/index.js:40:3
The text was updated successfully, but these errors were encountered:
What @elisheva50 said, your config.templates value should be **/*.html (notice the stars).
If I try your config (gulp.config.js) (code is fine btw), with my gulp tasks versions, I don't get an error, but... the template.js don't get build. I hope it helps.
Another thing that is different from mine, your clean code comment:
Yours:
Notice the second line (folder structure). I think you are forgetting a lot of stars, please post your full gulp config file with the correct markdown code tags.
I am having an issue while running gulp templatecache. I have installed the dependencies gulp-angular-templatecache and gulp-minify-html. I have also added the information in the gulp.config.js file.
TYPEERROR: undefined is not a function
Assistance would be greatly appreciated.
gulpfile.js --->
gulp.task('templatecache',['clean-code'], function() {
log('Creating an AngularJS $templateCache');
return gulp
.src(config.htmltemplates)
.pipe($.minifyHtml({empty: true}))
.pipe($.angularTemplatecache(config.templateCache.file, config.templateCache.options))
.pipe(gulp.dest(config.temp));
});
gulp.config.js --->
htmltemplates: clientApp + '*/.html',
templateCache: {
file: 'templates.js',
options: {
module: 'app.core',
standAlone: false,
root: 'app/'
}
},
console info and error ---->
➜ pluralsight-gulp git:(master) ✗ gulp templatecache
[10:25:39] Using gulpfile ~/sites/pluralsight-gulp/gulpfile.js
[10:25:39] Starting 'clean-code'...
[10:25:39] Cleaning: ./.tmp//*.js,./build//.html,./build/js/__/.js
[10:25:39] Finished 'clean-code' after 82 ms
[10:25:39] Starting 'templatecache'...
[10:25:39] Creating an AngularJS $templateCache
[10:25:39] 'templatecache' errored after 7.49 ms
[10:25:39] TypeError: undefined is not a function
at Gulp. (/Users/malikdixon1/sites/pluralsight-gulp/gulpfile.js:110:19)
at module.exports (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:279:18
at finish (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/index.js:54:4
at module.exports (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/node_modules/each-async/index.js:22:3)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/index.js:40:3
The text was updated successfully, but these errors were encountered: