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

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

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

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

相關文章:
主站蜘蛛池模板: 日韩黄色三级视频 | 黄色一级网 | 天天综合网天天综合色不卡 | 免费又爽又黄禁片观看1000 | 女人色毛片女人色毛片中国 | 久久久久久久久久久96av | 天天影视亚洲 | 国产福利不卡 | 日韩一级片在线免费观看 | 野外三级国产在线观看 | 一级黄大片| 欧美精品一区二区三区久久 | 欧美成人在线影院 | 香蕉tv亚洲专区在线观看 | 国产三级在线观看a | 欧美日韩亚洲区久久综合 | 欧美日韩国产高清 | 天天在线天天看成人免费视频 | 中文一区二区视频 | a级毛片在线观看 | 国产一级毛片国语版 | 成年女人视频播放免费观看 | 97dyy在线观看手机版 | 极品嫩模被黑人20厘米 | 国产免费一级精品视频 | 日本欧美一区二区三区免费不卡 | 国产小说 | 久久只有这才是精品99 | 欧美三级免费 | 手机视频在线观看 | 91在线视频免费观看 | 丁香婷婷久久大综合 | 国产综合色精品一区二区三区 | 黄色大片毛片 | 麻豆免费视频 | 欧美日韩国产最新一区二区 | 国产高清a毛片在线看 | 26uuu亚洲影视新地址 | 国产亚洲精品美女2020久久 | 精品成人免费一区二区在线播放 | 欧美一级毛片在线看视频 |