亚洲免费在线视频-亚洲啊v-久久免费精品视频-国产精品va-看片地址-成人在线视频网

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

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

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

相關文章:
主站蜘蛛池模板: 日韩国产在线播放 | 美国毛片一级 | 亚洲综合a | 一级做a爰片久久毛片唾 | 亚洲三级在线 | 日本在线观看一级高清片 | 亚洲成人高清 | 日本三级香港三级三级人!妇久 | 91成人国产网站在线观看 | 一级视频在线免费观看 | 91香焦视频 | 日本一区二区三区在线 视频观看免费 | 久草手机在线视频 | 91大神大战丝袜美女在线观看 | 日韩成人小视频 | 国产综合精品一区二区 | 伊人久久91 | 一区二区三区免费视频播放器 | 成年人色网站 | 久久99精品免费视频 | 成年人免费网站在线观看 | 日本一区毛片免费观看 | 日韩欧美一二区 | 久久频这里精品99香蕉久网址 | 久久er精品热线免费 | 456亚洲视频 | 手机看片国产在线 | 久草视频资源在线 | 中文字幕视频免费在线观看 | 末成年娇小性色xxxxx | 99久久在线| 欧美一级大片在线观看 | 久久er精品热线免费 | 亚洲成人免费 | 欧美成人爽毛片在线视频 | 大量愉拍情侣在线视频 | 毛片成人| 中文字幕高清在线天堂网 | 毛片毛片毛是个毛毛片 | 亚洲91在线| 国产日韩精品一区二区三区 |