Closed easYnow closed 3 years ago
It's been a while so haven't run into this. But you can probably go one of two ways with this;
var sass = require('gulp-sass')(require('sass'));
Place that in the variable chain without var
or add a new line after.
Then find the line with plugin.sass()
and replace with just sass()
.Hopefully that should help. Note: Above is all theory, I didn't test anything.
Hi Garret,
Thanks for your suggestions, much appreciated.
I tried both of these and unfortunately neither worked for me.
I checked the package.json file and it did have "gulp-sass": "5.0.0", although I didn't edit it?! I have since changed this and still get the same error?
When I follow step 2 I get this error -
--
jointswp-sass@5.0.0 watch /Users/thomaswilson/dev/pioneer/wp-content/themes/pioneer gulp watch
Error: Cannot find module 'sass' Require stack:
Please let me know if you have any further thoughts.. Thanks Tom
Actually I have now resolved, i needed to clear the NPM cache with the following -
npm cache clear --force npm install sass
Garret - noting your comment re 'it's been a while' do you mind me asking what you use as a 'starter' or development theme these days?
Nice, glad to hear you got things working there Tom. I don't develop themes for WP these days, am working with Laravel at my new position. Sorry I don't have any suggestions.
Hey all..
I've run into a new error today setting up a new dev site with JointsWP -
Error in plugin "gulp-sass" Message:
gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the
sass
andnode-sass
packages are permitted. For example, in your gulpfile:var sass = require('gulp-sass')(require('sass'));
I've tried adding ' var sass = require('gulp-sass')(require('sass')); ' to the gulp file and a few other solutions I saw online, but no joy yet....
Is anyone else facing this issue, or know of a solution for this problem?
Thanks Tom