Gulp:/ bin / sh:scss:命令未找到

时间:2017-06-02 17:51:03

标签: gulp gulp-sass

不确定我的吞咽是怎么回事。我一直收到错误

/ bin / sh:scss:command not found

继承人gulpfile.js

var gulp= require('gulp'),
sass = require('gulp-scss'),
prefix = require('gulp-autoprefixer'),
jsmin = require('gulp-jsmin'),
rename = require('gulp-rename');
//html-minify
//validate sass

//sass 
gulp.task('sass', function () {
gulp.src('../*.scss')
    .pipe(sass({outputStyle: 'compressed'}))
    .pipe(gulp.dest('../css/'));
});

//minify js
gulp.task('jsmin', function () {
gulp.src('../*.js')
    .pipe(jsmin())
    .pipe(rename({suffix: '.min'}))
    .pipe(gulp.dest('../dist/'));
});

//default task
gulp.task('default',['jsmin', 'sass']);

这是我的package.json

{
"name": "xcite-gulp",
"version": "1.0.0",
"description": "",
"main": "gulpfile.js",
"dependencies": {
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
"gulp-jsmin": "^0.1.5",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0",
"gulp-scss": "^1.4.0"
 },
"devDependencies": {
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
"gulp-jsmin": "^0.1.5",
"gulp-rename": "^1.2.2",
"gulp-scss": "^1.4.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
 "author": "",
"license": "ISC"
}

运行gulp-sass时出现新错误:

TypeError: "listener" argument must be a function
at _addListener (events.js:238:11)
at DestroyableTransform.addListener (events.js:298:10)
at DestroyableTransform.Readable.on 
(/Applications/XAMPP/xamppfiles/htdocs/xcite-gulp-
pulldown/node_modules/through2/node_modules/readable-
stream/lib/_stream_readable.js:661:33)
at Gulp.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/xcite-gulp-
pulldown/gulpfile.js:30:18)
at module.exports (/Applications/XAMPP/xamppfiles/htdocs/xcite-gulp-
pulldown/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask 
(/Applications/XAMPP/xamppfiles/htdocs/xcite-gulp-
pulldown/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep 
(/Applications/XAMPP/xamppfiles/htdocs/xcite-gulp-
pulldown/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start . 
(/Applications/XAMPP/xamppfiles/htdocs/xcite-gulp-
pulldown/node_modules/orchestrator/index.js:134:8)
 at /usr/local/lib/node_modules/gulp-
cli/lib/versioned/^3.7.0/index.js:51:20
at _combinedTickCallback (internal/process/next_tick.js:95:7)
Gulp local是3.9.1 Gulp CLI是1.3.0

我的jsmin编译得很好。

0 个答案:

没有答案