亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術文章
文章詳情頁

gulp的gulp-ruby-sass插件啟動不了報錯!

瀏覽:119日期:2024-08-08 18:27:32

問題描述

報錯:

λ gulp serve[18:22:40] Working directory changed to F:new-gulp-test[18:22:41] Using gulpfile F:new-gulp-testgulpfile.js[18:22:41] Starting ’scss’...[18:22:41] ’scss’ errored after 7.01 ms[18:22:41] ReferenceError: scss is not defined at Gulp.<anonymous> (F:new-gulp-testgulpfile.js:58:15) at module.exports (F:new-gulp-testnode_modules.npminstallorchestrator0.3.7orchestratorlibrunTask.js:34:7) at Gulp.Orchestrator._runTask (F:new-gulp-testnode_modules.npminstallorchestrator0.3.7orchestratorindex.js:273:3) at Gulp.Orchestrator._runStep (F:new-gulp-testnode_modules.npminstallorchestrator0.3.7orchestratorindex.js:214:10) at Gulp.Orchestrator.start (F:new-gulp-testnode_modules.npminstallorchestrator0.3.7orchestratorindex.js:134:8) at C:UsersAdministratorAppDataRoamingnpmnode_modules.gulp_npminstallgulp3.9.1gulpbingulp.js:129:20 at nextTickCallbackWith0Args (node.js:420:9) at process._tickCallback (node.js:349:13) at Function.Module.runMain (module.js:443:11) at startup (node.js:139:18)

node_modules目錄

gulp的gulp-ruby-sass插件啟動不了報錯!

gulpfile.js配置

var minifycss = require(’gulp-minify-css’),// CSS壓縮 uglify = require(’gulp-uglify’),// js壓縮 concat = require(’gulp-concat’),// 合并文件 rename = require(’gulp-rename’),// 重命名 clean = require(’gulp-clean’);//清空文件夾var gulp = require(’gulp’), sass = require(’gulp-ruby-sass’); notify = require(’gulp-notify’), plumber = require(’gulp-plumber’); browserSync = require(’browser-sync’).create(), reload = browserSync.reload;gulp.task(’serve’, [’scss’], function() { browserSync.init({server: './stc' }); gulp.watch('stc/**/*.scss', [’scss’]); gulp.watch('stc/*.html').on(’change’, reload);});gulp.task(’scss’, function() { return gulp.src([’stc/scss/*.scss’,’!stc/scss/extend/{reset,test}.scss’]).pipe(plumber({errorHandler: notify.onError(’Error: <%= error.message %>’)})).pipe(scss()).pipe(gulp.dest('stc/css')).pipe(reload({stream: true}));});gulp.task(’default’, [’serve’]);

問題解答

回答1:

你沒有一個叫scss的變量,看這里:

gulp.task(’scss’, function() { return gulp.src([’stc/scss/*.scss’,’!stc/scss/extend/{reset,test}.scss’]).pipe(plumber({errorHandler: notify.onError(’Error: <%= error.message %>’)})).pipe(sass()) //這里不對,應該是sass吧 .pipe(gulp.dest('stc/css')).pipe(reload({stream: true}));});回答2:

ruby-sass 是依賴 ruby 的,你確定 ruby 環境無誤么?建議還是直接用 node-sass 性能也更好一些。

相關文章:
主站蜘蛛池模板: 国产精品黄在线观看免费软件 | 国产在线视频www片 国产在线视频www色 | 婷婷六月丁香色婷婷网 | 国产成人久久精品二区三区牛 | 91尤物在线| 91免费国产| 欧美一级毛片免费看高清 | 麻豆传媒免费入口 | 在线免费看黄 | 国产精品一区二区四区 | 美女精品在线 | 午夜香蕉视频 | 亚洲高清视频网站 | 成人精品一区二区三区中文字幕 | 99久久免费看精品国产一区 | 国产精品aⅴ | 99久久精品国产交换 | 国产欧美日本亚洲精品五区 | 美女喷水视频在线观看 | 国产亚洲新品一区二区 | 色琪琪综合网站 | 偷窥盗摄在线播放 | 国产精品欧美一区二区三区 | 免费黄色毛片 | 免费一级毛片不卡不收费 | 久久精品免费观看 | 国产欧美一区二区三区免费看 | 久久精品一 | 国产人成精品香港三级在 | 婷婷亚洲国产成人精品性色 | 青草视频免费 | 国产精品性视频免费播放 | 精品久久香蕉国产线看观看亚洲 | 国产在线综合一区二区三区 | 欧美激情特级黄aa毛片 | 亚洲精品久久婷婷爱久久婷婷 | 亚洲欧美一区二区三区九九九 | 欧美性猛交xxx免费看人妖 | 亚洲福利 | 在线免费你懂的 | 国产区一区二 |