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 trialTracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsInstalling Gulp error, what does this mean?
Hi,
I am trying to have a go at using gulp on npm install gulp --save-dev
I am getting:
$ npm install gulp --save-dev npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp Do S issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp Do S issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7 .0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in t he tree. tracyexcell@1.0.0 C:\Users\tracyandgrant\Documents\Treehouse notes\website-optimization\work `-- gulp@3.9.1
What do I need to do to resolve this issue so that I can have a go at using it?
Thank you
1 Answer
Jon Wood
9,884 PointsIt looks like those are all just warnings and it should still be installed. What do you get if you type gulp
?
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 Pointsgulp is getting me:
tracyandgrant@DESKTOP-0EUKSQJ MINGW64 ~/Documents/Treehouse notes/website-optimi zation/work (master) $ gulp [20:55:12] Using gulpfile ~\Documents\Treehouse notes\website-optimization\work\ gulpfile.js [20:55:12] Task 'default' is not in your gulpfile [20:55:12] Please check the documentation for proper gulpfile formatting
Hi, I tried again tonight and just kept going through, I tried the gulp concat and have ended up with,
tracyandgrant@DESKTOP-0EUKSQJ MINGW64 ~/Documents/Treehouse notes/website-optimization/work (master) $ gulp concatScripts [20:51:18] Using gulpfile ~\Documents\Treehouse notes\website-optimization\work\gulpfile.js [20:51:18] Task 'concatScripts' is not in your gulpfile [20:51:18] Please check the documentation for proper gulpfile formatting
any ideas what I am doing wrong?
Jon Wood
9,884 PointsAhhh, it's installed :)
Next, just create a gulpfile.js
file and create a default task, then gulp should run!
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsHello Jon Wood,
Thank you for your help so far, I think I am almost there... but may not quite have my folders sorted correctly? When I run gulp concatScripts in the terminal it is doing the task:
$ gulp concatScripts
[09:51:53] Using gulpfile ~\Documents\Treehouse notes\website-
optimization\work\gulpfile.js
[09:51:53] Starting 'concatScripts'...
[09:51:53] Finished 'concatScripts' after 46 ms
however the results are not showing in the app.js file, as is show in the tutorial. Can you see any formatting mistakes I am making to get this to work correctly?
var gulp = require('gulp'),
concat = require('gulp-concat');
gulp.task("concatScripts", function() {
return gulp.src(['js/jquery.js',
'js/foundation.equalizer.js', 'js/foundation.reveal.js'])
.pipe(concat("../js/app.js"))
.pipe(gulp.dest("../js"));
});
gulp.task("default", ["Hello"], function() {
console.log("default task"); });
Files are sorted as in a folder
css/folder img/folder js/folder node modules/folder
gulpfile index package.json
Thank you
Jon Wood
9,884 PointsTry adding ./
in front of your files when you call gulp.src
. I'm not sure if it's able to find those files without that.
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsTracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsI have read a bit online and tried:
npm install -g minimatch
npm install -g graceful-fs
but when re code npm install gulp --save-dev, I get the same response?