Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp suddenly not working anymore after npm update #800

Closed
DESIGNfromWITHIN opened this issue Dec 1, 2014 · 34 comments
Closed

Gulp suddenly not working anymore after npm update #800

DESIGNfromWITHIN opened this issue Dec 1, 2014 · 34 comments

Comments

@DESIGNfromWITHIN
Copy link

All scripts run, no errors but no files are created by .pipe(gulp.dest('production'));

My Gulpfile.js:

// npm install gulp gulp-util gulp-sass gulp-uglify gulp-rename gulp-minify-css gulp-notify gulp-concat node-bourbon node-neat browser-sync --save-dev

var gulp = require('gulp');  
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var notify = require('gulp-notify');
var minifycss = require('gulp-minify-css');
var concat = require('gulp-concat');
var bourbon = require('node-bourbon');
bourbon.includePaths // Array of Bourbon paths
var neat = require('node-neat').includePaths;
var plumber = require('gulp-plumber');
var browserSync = require('browser-sync');
var reload = browserSync.reload;

var paths = {
    scss: './sass/*.scss'
};

gulp.task('scripts', function() {
    return gulp.src([
        'js/plugins/jquery-1.11.1.js',
        'js/plugins/jquery.fitvids.js',
        'js/plugins/classie.js',
        'js/plugins/prism.js',
        'js/plugins/prism-file-highlight.js',
        'js/site.js',
        'js/plugins/slide.js'
    ])
    .pipe(concat('main.js'))
    .pipe(gulp.dest('production'))
    .pipe(rename({suffix: '.min'}))
    .pipe(uglify())
    .pipe(gulp.dest('production'));
});

gulp.task('home_scripts', function() {
    return gulp.src([
        'js/plugins/jquery-1.11.1.js',
        'js/plugins/jquery.fitvids.js',
        'js/site.js'
    ])
    .pipe(concat('home.js'))
    .pipe(gulp.dest('production'))
    .pipe(rename({suffix: '.min'}))
    .pipe(uglify())
    .pipe(gulp.dest('production'));
});

gulp.task('sass', function () {  
    gulp.src('scss/style.scss')
    .pipe(plumber())
    .pipe(sass({
        includePaths: ['scss'].concat(neat)
    }))
    .pipe(gulp.dest('production'))
    .pipe(rename({suffix: '.min'}))
    .pipe(minifycss())
    .pipe(gulp.dest('production'))
    .pipe(reload({
        stream:true
    }));
});

// Reload all Browsers
gulp.task('bs-reload', function () {
    browserSync.reload();
});

gulp.task('browser-sync', function() {
    browserSync.init(["production/*.css", "production/*.js"], {
        proxy: "designfromwithin.local"
    });
});

// Watch scss, js and html files, doing different things with each.
gulp.task('default', ['sass', 'browser-sync'], function () {
    // Watch SCSS files and run sass if any SCSS files change.
    gulp.watch(["scss/*.scss", "scss/plugins/*.scss"], ['sass'])
    // Watch the app.js file and run scripts when fiels change, after that refresh browser to see updated JS.
    gulp.watch(["js/site.js"], ['scripts', 'home_scripts'])
    // Watch the .html files and run refresh browser to see updated HTML.
    gulp.watch(["*.html"], ['bs-reload']);
});
@mateusvahl
Copy link

+1, you are using windows too?

@hugoparis19
Copy link

+1, with windows too

@heikki
Copy link
Contributor

heikki commented Dec 1, 2014

isaacs/node-glob#145

@evgenyt1
Copy link

evgenyt1 commented Dec 1, 2014

+1, under Windows gulp.src() returns no files. All is OK under Mac OS X

@cybermaxs
Copy link

👍 same for me

@havenchyk
Copy link

👍 Same here

@DESIGNfromWITHIN
Copy link
Author

Yup windows 7.

This is bad, I now realize that my entire workflow is stuck and that I can not work before this is fixed...
Makes me think of depending on tools like Gulp for my web projects.

@tanint
Copy link

tanint commented Dec 1, 2014

+1, I'm using windows 8

@jarekw87
Copy link

jarekw87 commented Dec 1, 2014

+1, windows 7

@Emnalyeriar
Copy link

Same here, we're stuck right now.

@Jono20201
Copy link

+1 Driving me crazy.

@mtmzorro
Copy link

mtmzorro commented Dec 1, 2014

+1 windows7

@liquidcowgithub
Copy link

+1 for windows 7, 8 and 8.1

@codeofsumit
Copy link

+1 for windows 7, 8, 8.1 - spent 4 hours searching for the problem... gave up now. The whole team stopped working :O

@bjarniolsen
Copy link

+1 Windows 8.1

@DESIGNfromWITHIN
Copy link
Author

LOL guess I am not the only one...

@Namek
Copy link

Namek commented Dec 1, 2014

It sucks. Just before a deadline.

@Jono20201
Copy link

Thankfully it appears to be working on Linux, and double-thankfully I am using Vagrant.

@mateusvahl
Copy link

Anyone have a plan B? I'm standing...

@codeofsumit
Copy link

Use Mac... :D

@Namek
Copy link

Namek commented Dec 1, 2014

yeah, add dependency glob@4.2.2, remove whole node_modules folder and do npm install once again.

@jonathancounihan
Copy link

A team member at my work has suggested a solution:

  1. Find someone on the project that still has npm packages installed that work.
  2. Have them run 'npm shrinkwrap --dev', this generates a file called npm-shrinkwrap.json.
  3. Have them check in npm-shrinkwrap.json
  4. Delete the node_modules folder on computers where it's failing.
  5. Run npm install again on those computers. It will choose versions based on the npm_shrinkwrap file instead of the packages file.

Credit to @JWorthe for the steps.

@codeofsumit
Copy link

glob@4.2.2 works!

@hugoparis19
Copy link

add dependency glob@4.2.2 (npm install glob@4.2.2), remove whole node_modules folder and do npm install once again : worked for me

@Emnalyeriar
Copy link

I changed glob-stream dependency in gulp -> vinyl-fs to 4.2.2 and it worked

@DESIGNfromWITHIN
Copy link
Author

glob@4.2.2 (npm install glob@4.2.2)
Not working for me... ;-(

@bjarniolsen
Copy link

glob@4.2.2 (npm install glob@4.2.2)
Also not working for me...

@mateusvahl
Copy link

1 - Run: "npm install glob@4.2.2"
2 - Run: "npm install"
3 - Try run gulp. works for me. I almost learned to install grunt.

@tatkowski
Copy link

glob@4.2.2, remove node_modules, npm install. worked like a charm 👍

@noelblaschke
Copy link

Tested on Windows 8.1

  1. Go to your gulpfile.js folder
  2. npm install -D glob@4.2.2
  3. remove all package.json dependency entries
  4. npm prune & rm node_modules (the bad windows way)
  5. npm cache clear
  6. redo package.json dependency entries
  7. npm install

is working for me.

@jonschlinkert
Copy link

This all could have been avoided. isaacs/minimatch#52

@isaacs
Copy link

isaacs commented Dec 1, 2014

Fixed on glob 4.3.1.

@jonschlinkert Please do not make snarky comments like this. It is childish.

@phated
Copy link
Member

phated commented Dec 1, 2014

@isaacs thanks for jumping on this so quickly. I really appreciate it.

Closing as this is not a gulp bug and @isaacs says it is fixed upstream.

@phated phated closed this as completed Dec 1, 2014
@phated
Copy link
Member

phated commented Dec 1, 2014

@jonschlinkert removing the post and locking this thread

@gulpjs gulpjs locked and limited conversation to collaborators Dec 1, 2014
Cocola pushed a commit to BeAPI/beapi-frontend-framework that referenced this issue Jul 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests