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

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

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

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

相關文章:
主站蜘蛛池模板: 日本69xxxx免费视频 | 亚洲一区二区三区在线观看蜜桃 | 亚洲国产系列 | 国产福利一区二区在线精品 | 国产图片亚洲精品一区 | 成人a一级毛片免费看 | 国产精品任我爽爆在线播放66 | 国产成人一级片 | 香港三级理论在线影院 | 国产伦精品一区二区 | 免费能直接在线观看黄的视频 | 国产精品第八页 | 日本一二三本免费视频 | 国产一级片视频 | 1024视频在线观看国产成人 | 99久久精品国产麻豆 | 国产精品自在线拍 | 国产一级片免费观看 | 农村妇女野外牲交一级毛片 | a级毛片观看 | 国产一级毛片网站 | 中文字幕在线观看一区二区三区 | 免费高清毛片在线播放视频 | 午夜久久久| 国产美女福利在线 | 网友自拍视频在线观看 | 亚洲 激情 | 久久青青操 | 黑人在线视频 | 亚洲欧美日韩综合在线播放 | 亚洲夜色| 国产精品系列在线 | 国产精品亚洲午夜不卡 | 亚洲精品久久玖玖玖玖 | 亚洲欧美精品中字久久99 | 亚洲性一级理论片在线观看 | 成人福利在线视频 | a级毛片免费看 | 九九精品视频在线观看 | 国产中日韩一区二区三区 | 香港性特级黄录像片 |