File to import not found or unreadable: compass/reset.
F:\newpagebao\happybao\stc (master) λ gulp serve [15:02:21] Working directory changed to F:\newpagebao [15:02:22] Using gulpfile F:\newpagebao\gulpfile.js [15:02:22] Starting 'sass'... [15:02:22] error happybao/stc/scss/idx.scss (Line 1: File to import not found or unreadable: compass/reset.) [15:02:22] Finished 'sass' after 455 ms [15:02:22] Starting 'serve'... [15:02:22] Finished 'serve' after 43 ms [BS] Access URLs: ------------------------------------- Local: http://localhost:3000 External: http://192.168.1.14:3000 ------------------------------------- UI: http://localhost:3001 UI External: http://192.168.1.14:3001 ------------------------------------- [BS] Serving files from: ./happybao/stc
gulpfile-settings:
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'), sourcemaps = require('gulp-sourcemaps'), filter = require('gulp-filter'); notify = require('gulp-notify'), plumber = require('gulp-plumber'); browserSync = require('browser-sync').create(), reload = browserSync.reload; gulp.task('serve', ['sass'], function() { browserSync.init({ server: "./happybao/stc" }); gulp.watch("happybao/**/*.scss", ['sass']); gulp.watch("happybao/**/*.html").on('change', reload); }); gulp.task('sass', function() { return sass(['happybao/stc/scss/*.scss','!happybao/stc/scss/extend/{reset,test}.scss'],{sourcemap:true}) //.pipe(sourcemaps.init()) .on('error',function(err) { notify().write(err); this.emit('end'); }) .pipe(sourcemaps.write('../maps')) .pipe(gulp.dest('happybao/stc/css'))// Write the CSS & Source maps .pipe(filter('happybao/**/*.css')) // Filtering stream to only css files .pipe(reload({stream: true}));//必须要 }); gulp.task('default', ['serve']);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
compass
装了么?还有你用的是
gulp-sass
还是什么东西在做这件事?这个问题最好还是从使用的插件着手既然打算用compass,为什么不用gulp-compass这个插件呢
应该是这个问题,调用compass需要compass watch,所以直接使用sass可能不行
https://github.com/appleboy/gulp-compass