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

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

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

瀏覽:125日期: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 性能也更好一些。

相關文章:
主站蜘蛛池模板: 日韩在线一区二区三区 | 亚洲国产精品自产拍在线播放 | 日本特黄特色aa大片免费 | 国产香蕉视频在线 | 欧美一区二区三区视频 | 国产午夜一级鲁丝片 | 不卡国产在线 | 国产一级毛片视频在线! | 久久www免费人成高清 | 久久99爱爱 | 欧美一区视频 | 欧美色欧美亚洲另类二区 | 久久精品爱 | 在线观看亚洲一区二区 | 国产草草 | 不卡视频免费在线观看 | 日本欧美中文字幕人在线 | 在线观看自拍视频 | 日本道色综合久久影院 | 中文字幕日韩理论在线 | 亚洲国产精品毛片∧v卡在线 | 成人在线视频网 | 欧美真人毛片动作视频 | 国产麻豆影院 | 毛片在线视频在线播放 | 国产大尺度吃奶无遮无挡网 | 亚洲精品一区二区ai换脸 | 成年女人视频播放免费观看 | 亚洲一区二区三区日本久久九 | 91小视频版在线观看www | 国产免费午夜 | 美女黄18岁以下禁看 | 亚洲成人中文 | 国产精品国产精品国产三级普 | 91麻豆精品视频 | 一级黄色在线观看 | 免费观看性行为的视频网站 | 免费观看在线永久免费xx视频 | 青青国产成人久久91网 | 欧美日韩中出 | 一级国产20岁美女毛片 |