av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術(shù)文章
文章詳情頁

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

瀏覽:134日期: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 環(huán)境無誤么?建議還是直接用 node-sass 性能也更好一些。

相關(guān)文章:
主站蜘蛛池模板: 日韩一区中文字幕 | 久久综合影院 | 午夜视频免费在线观看 | 亚洲视频免费 | 国产黄在线 | 午夜免费福利视频 | 精品在线观看视频 | 好吊日在线视频 | 亚洲高清免费视频 | 国产不卡在线视频 | 久久精品在线 | 久久精品在线视频 | 日韩成人精品 | 综合导航 | 亚洲国产成人在线 | 天天操天天干天天操 | 99热| 在线色网 | 国产999久久久 | 日韩爱爱视频 | 日韩欧美一区在线 | 精品三级在线观看 | 中文字幕在线观看一区二区三区 | 丁香在线视频 | 91一级片 | 蜜桃视频一区二区三区 | 国产一级黄色大片 | 午夜天堂av | 日韩视频一区 | 亚洲成人中文字幕 | 国产日韩免费 | 日本色图视频 | 97青青草 | 色综合天天综合网天天狠天天 | 欧美狠狠干 | 四虎海外 | 91久久精品日日躁夜夜躁欧美 | 国产不卡在线视频 | 精品免费在线 | 97人人爱| 日韩免费在线 |