问题描述
我正在使用gulp,我正在尝试安装软件包,并且在windows上安装gulp的唯一方法是键入npm install -g [email protected],因为新版本会在控制台中打印出一些有关v8flags包。
所以我想通过Gulp编译sass。我有一个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'));
} );
但每次输入gulp sass时,控制台都会打印:
错误SASS可执行文件缺失。请安装并在您的PATH上提供它。
我在PATH var(Enviroment变量中的系统变量)中包含了我的ruby bin目录。
我在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)
我有同样的问题。我做了
sudo gem install sass
,并将sass可执行文件添加到我的路径中。
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 [email protected] 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)
I had the same problem. I did
sudo gem install sass
and that added the sass executable to my path.
这篇关于Gulp缺少SASS可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!