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

JavaScript Gulp Basics Improving your Gulp Task Pipelines Where to next?

Production folder not created after running gulp clean

After running the task gulp clean the task gulp fonts is supposed to create a folder named production. No folder was created.

Huston Hedinger
Huston Hedinger
Treehouse Guest Teacher

Sally, please add the console output you are getting, as well as all of the files/folders in the root of your project from running ls, or using a tool like tree.

2 Answers

It's a problem with the module "main-bower-files" that I couldn't figure out without digging way deeper into bower and the associated tools. Something about how they are used changed after this lesson was written.

But you can bypass the problem by going to the gulp fonts task in build.js and replacing

'$.mainBowerFiles()'

with

'bower_components/**/*'

That glob will find all the files in the bower_components subfolders and pass them to be filtered by the next command.

Huston,

Here is the output. After I restarted I did have the bower-components directory, so that part seems to have fixed itself. However, I still don't get the dist directory after running clean and then fonts. I did run ls after each task to check for the directories.

C:\Users\Wil\advanced-gulp-example [master]> gulp
[11:36:58] Using gulpfile ~\advanced-gulp-example\gulpfile.js
[11:36:58] Starting 'clean'...
[11:36:58] Finished 'clean' after 120 ms
[11:36:58] Starting 'default'...
[11:36:58] Starting 'scripts'...
[11:36:58] Starting 'styles'...
[11:36:59] Starting 'markups'...
[11:36:59] Starting 'fonts'...
[11:37:00] Starting 'other'...
[11:37:00] Finished 'default' after 1.61 s
[11:37:00] Finished 'markups' after 597 ms
[11:37:00] Starting 'partials'...
[11:37:00] gulp-inject Nothing to inject into index.scss.
Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([a
utoprefixer]).process() instead
[11:37:01] all files 10.63 kB
[11:37:01] Finished 'scripts' after 2.6 s
[11:37:01] Finished 'fonts' after 1.17 s
[11:37:01] Finished 'partials' after 938 ms
[11:37:01] Finished 'other' after 1.04 s
Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([a
utoprefixer]).process() instead
[11:37:02] Finished 'styles' after 3.25 s
[11:37:02] Starting 'inject'...
[11:37:02] gulp-inject 1 files into index.html.
[11:37:02] gulp-inject 3 files into index.html.
[11:37:02] Finished 'inject' after 221 ms
[11:37:02] Starting 'html'...
[11:37:03] gulp-inject 1 files into index.html.
[11:37:20] 'dist/' styles\app-16c2683b.css 130 B
[11:37:20] 'dist/' styles\vendor-6dd02245.css 119.81 kB
[11:37:20] 'dist/' scripts\app-b9d215bf.js 3.93 kB
[11:37:20] 'dist/' scripts\vendor-5ebb3d64.js 337.95 kB
[11:37:20] 'dist/' index.html 1.05 kB
[11:37:20] 'dist/' all files 462.88 kB
[11:37:20] Finished 'html' after 18 s
[11:37:20] Starting 'build'...
[11:37:20] Finished 'build' after 9.41 µs
C:\Users\Wil\advanced-gulp-example [master]> ls


    Directory: C:\Users\Wil\advanced-gulp-example


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         7/24/2015  11:37 AM            .tmp
d----         7/23/2015   3:08 PM            bower_components
d----         7/24/2015  11:37 AM            dist
d----         7/23/2015   2:49 PM            e2e
d----         7/23/2015   2:49 PM            gulp
d----         7/23/2015   3:27 PM            node_modules
d----         7/23/2015   2:49 PM            src
-a---         7/23/2015   2:49 PM         41 .bowerrc
-a---         7/23/2015   2:49 PM        227 .editorconfig
-a---         7/23/2015   2:49 PM         11 .gitattributes
-a---         7/23/2015   2:49 PM        110 .gitignore
-a---         7/23/2015   2:49 PM        667 .jshintrc
-a---         7/23/2015   2:49 PM       1483 .yo-rc.json
-a---         7/23/2015   2:49 PM        515 bower.json
-a---         7/23/2015   2:49 PM       2332 coffeelint.json
-a---         7/24/2015  11:30 AM        752 gulpfile.js
-a---         7/23/2015   2:49 PM       1017 karma.conf.js
-a---         7/23/2015   2:49 PM       1647 package.json
-a---         7/23/2015   2:49 PM        733 protractor.conf.js
-a---         7/23/2015   2:49 PM        689 README.md


C:\Users\Wil\advanced-gulp-example [master]> gulp clean
[11:37:38] Using gulpfile ~\advanced-gulp-example\gulpfile.js
[11:37:38] Starting 'clean'...
[11:37:38] Finished 'clean' after 173 ms
C:\Users\Wil\advanced-gulp-example [master]> ls


    Directory: C:\Users\Wil\advanced-gulp-example


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         7/23/2015   3:08 PM            bower_components
d----         7/23/2015   2:49 PM            e2e
d----         7/23/2015   2:49 PM            gulp
d----         7/23/2015   3:27 PM            node_modules
d----         7/23/2015   2:49 PM            src
-a---         7/23/2015   2:49 PM         41 .bowerrc
-a---         7/23/2015   2:49 PM        227 .editorconfig
-a---         7/23/2015   2:49 PM         11 .gitattributes
-a---         7/23/2015   2:49 PM        110 .gitignore
-a---         7/23/2015   2:49 PM        667 .jshintrc
-a---         7/23/2015   2:49 PM       1483 .yo-rc.json
-a---         7/23/2015   2:49 PM        515 bower.json
-a---         7/23/2015   2:49 PM       2332 coffeelint.json
-a---         7/24/2015  11:30 AM        752 gulpfile.js
-a---         7/23/2015   2:49 PM       1017 karma.conf.js
-a---         7/23/2015   2:49 PM       1647 package.json
-a---         7/23/2015   2:49 PM        733 protractor.conf.js
-a---         7/23/2015   2:49 PM        689 README.md


C:\Users\Wil\advanced-gulp-example [master]> gulp fonts
[11:38:07] Using gulpfile ~\advanced-gulp-example\gulpfile.js
[11:38:07] Starting 'fonts'...
[11:38:07] Finished 'fonts' after 311 ms
C:\Users\Wil\advanced-gulp-example [master +0 ~1 -0]> ls


    Directory: C:\Users\Wil\advanced-gulp-example


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         7/23/2015   3:08 PM            bower_components
d----         7/23/2015   2:49 PM            e2e
d----         7/23/2015   2:49 PM            gulp
d----         7/23/2015   3:27 PM            node_modules
d----         7/23/2015   2:49 PM            src
-a---         7/23/2015   2:49 PM         41 .bowerrc
-a---         7/23/2015   2:49 PM        227 .editorconfig
-a---         7/23/2015   2:49 PM         11 .gitattributes
-a---         7/23/2015   2:49 PM        110 .gitignore
-a---         7/23/2015   2:49 PM        667 .jshintrc
-a---         7/23/2015   2:49 PM       1483 .yo-rc.json
-a---         7/23/2015   2:49 PM        515 bower.json
-a---         7/23/2015   2:49 PM       2332 coffeelint.json
-a---         7/24/2015  11:37 AM        758 gulpfile.js
-a---         7/23/2015   2:49 PM       1017 karma.conf.js
-a---         7/23/2015   2:49 PM       1647 package.json
-a---         7/23/2015   2:49 PM        733 protractor.conf.js
-a---         7/23/2015   2:49 PM        689 README.md


C:\Users\Wil\advanced-gulp-example [master +0 ~1 -0]>

I hope you can see something helpful in this.

Any luck with this? I just redid the whole thing with new downloads and everything, and I still get the same results: after running gulp clean and then running gulp fonts the dist file is not created.