With this problem, I found out that when gulp-sass crashes, it is probably due to a Sass or Scss syntax error caused by a wrong indent or something similar. This is probably not caused by damage to Gulp or Sass or gulp-Sass or another js plugin.
What a revelation.
This was not obvious to me, because I usually get sass syntax errors printed on the console, and I assumed that this would happen in all sass errors, but this error seemed to be more damaging because it loaded into the sass loop.
The only way to find an error is to disable all sass files one by one until sassgulp stops crashing. Then debug the failed file.
This helps debug if you split your sass / sass files and load into really small files and folders and include them in @import. Then you can easily comment on @import lines to find the file with the error.
In case you have this problem and you definitely don't have Sass errors (unlikely) -
Here is a random list of things that I was ready to try, which I found here https://github.com/sass/node-sass/issues/918 :
1. Initially, I thought I fixed it by uninstalling and reinstalling gulp-sass.
- Completely removes the node_modules directory and does a new npm installation
- Doing npm uninstall Gulp and gulp-sass, then the new npm install
- Performing a global installation of node-sass and globally uninstalling node-sass.
- Running npm rebuild node-sass from the node_modules / gulp-sass directory
- Performing an npm install using node-sass @ 2, then node-sass @ 3 if that didn't work
- A few times knocking my head on my desk
source share