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 trial

Development Tools Using Gulp's 'gulp-useref' For a Full Build Pipeline

Randolph Judy
PLUS
Randolph Judy
Courses Plus Student 28,198 Points

Errors when compiling jade with gulp

I am trying to use gulp with express to compile jade. I get an error on the following line:: " - each item in customers". The variable customers is rendered in the app.js file and is the results of a database query. The program works fine and displays the results in a table.

This is the code from gulpfile:.js

gulp.task('jade', function(){ return gulp.src('src/views/*/.jade') .pipe(jade({pretty: true})) .pipe(gulp.dest('builds/development')); });

I am using "gulp jade" to invoke this task. This works fine if I comment out everything but the html instructions in index.jade, I believe the problem is that customers is not defined as far as gulp is concerned, but I don't know how to define it for gulp.