Since this problem I've learned that when gulp-sass crashes it is probably because of a Sass or Scss syntax error caused by incorrect indentation or something similar. It is probably not caused by Gulp or Sass or Gulp-Sass or another js plugin being corrupted.
What a revelation.
This was not obvious to me as because I normally get sass syntax errors printed to the console and I assumed this would happen on all sass errors, but this error it seems was bit more destructive because it fed into a sass loop.
The only way to find the error to disable all sass files one by one until sass-gulp stops crashing. Then debug the faulty file.
It helps debugging if you break your sass/sass files and up into really small files and folders and include them with @import. Then you can comment out @import lines easily, to find the file with the error.
In-case you have this problem and you definitely have no Sass errors (unlikely)-
Here is a random list of stuff I was ready to try that I found here https://github.com/sass/node-sass/issues/918 :
1.Initially I thought I fixed it by un-installing and reinstalling gulp-sass.
- Completely deleting the node_modules directory and doing a fresh npm install
- Doing a npm uninstall of gulp and gulp-sass, then a fresh npm install
- Doing a global install of node-sass, and doing a global uninstall of node-sass.
- Doing a npm rebuild node-sass from within the node_modules/gulp-sass directory
- Doing a npm install with node-sass@2, then node-sass@3 when that didn't work
- Banging my head repeatedly against my desk