Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialammarkhan
Front End Web Development Techdegree Student 21,661 Pointsunable to compile and run task
After i run gulp concatScripts i got this long message, don't know what to make of it.
C:\wamp\www\sandbox>gulp concatScripts Using gulpfile C:\wamp\www\sandbox\gulpfile.js Starting 'concatScripts'... 'concatScripts' errored after 9.76 ms TypeError: Cannot read property 'on' of undefined at DestroyableTransform.Readable.pipe (C:\wamp\www\sandbox\node_modules\viny l-fs\node_modules\readable-stream\lib_stream_readable.js:516:7) at Gulp.<anonymous> (C:\wamp\www\sandbox\gulpfile.js:12:4) at module.exports (C:\wamp\www\sandbox\node_modules\orchestrator\lib\runTask .js:34:7) at Gulp.Orchestrator._runTask (C:\wamp\www\sandbox\node_modules\orchestrator \index.js:273:3) at Gulp.Orchestrator._runStep (C:\wamp\www\sandbox\node_modules\orchestrator \index.js:214:10) at Gulp.Orchestrator.start (C:\wamp\www\sandbox\node_modules\orchestrator\in dex.js:134:8) at C:\Users\xxx\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:1 29:20 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) at Module.runMain (module.js:606:11)
C:\wamp\www\sandbox>
where my code for fulpfile.js is as follow
'use strict';
var gulp = require('gulp');
var concat = require('gulp-concat');
gulp.task("concatScripts", function(){
gulp.src([
'js/jquery.js',
'js/sticky/jquery.sticky.js',
'js/main.js'
])
.pipe(concat["app.js"])
.pipe(gulp.dest("js"))
});
alex novickis
34,894 Pointsalex novickis
34,894 Pointsconcat I think should use parameter not array, ie .pipe(concat["app.js"])
change to .pipe(concat("app.js"))