Gulp missing the SASS executable

拟墨画扇 提交于 2019-12-13 07:35:31

问题


I'm working with gulp, I'm trying to install packages and the only way to install gulp on windows is to type npm install -g gulp@3.8.7 because new versions print me in the console some errors about the v8flags package. So I'm trying to compile sass through Gulp. I've a gulpfile.js:

'use strict';

var gulp = require('gulp');
var sass = require('gulp-ruby-sass');

gulp.task('sass', function() {
  return sass('css/main.scss')
  .on('error', function (err) {
    console.error('Error', err.message);
  })
  .pipe(gulp.dest('css/main.css'));
});

But Everytime I type "gulp sass" the console prints:

Error Missing the SASS executable. Please install and make it available on your PATH.

I have included the directory of my ruby bin in the PATH var (system variables within Enviroment variables).

I'm on Windows 8.1

ruby -v
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

node -v 
v0.10.29

npm -v
1.4.14

sass -v
Sass 3.4.8 (Selective Steve)

回答1:


I had the same problem. I did

sudo gem install sass 

and that added the sass executable to my path.



来源:https://stackoverflow.com/questions/27197701/gulp-missing-the-sass-executable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!