Gulp with Gulp-Ruby-Sass: Error: ../Style.Css.Map:3:1: Unknown Word

gulp with gulp-ruby-sass: Error: ../style.css.map:3:1: Unknown word

Disabling sourcemaps is some kind of mystery right now. You have to do it like this

.pipe(sass({ "sourcemap=none": true }))

Source

css.map not found using gulp-ruby-sass

There is something wrong with gulp-ruby-sass.
Instead of using

sourcemap: none

use

"sourcemap=none": true

to disable sourcemaps

I tried it myself to fix an "Unknown Word" error.

Source

Gulp ruby-sass and autoprefixer do not get along

Instead of:

browsers: ['last 2 versions'],

Try this:

browsers: ['last 2 version'],

If that doesn't work, I've had better luck with gulp-sass and gulp-sourcemaps.

// Compile Sass & create sourcemap
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write())
.pipe(gulp.dest('css'))

// Autoprefix, load existing sourcemap, create updated sourcemap
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(autoprefixer('last 2 version')
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('css'))

Error: File to import not found or unreadable: ~bootstrap/scss/bootstrap

When Sass is precompiled by its own CLI, it processes @imports by itself, and sometimes thus doesn’t understand ~ notation. So you can import "node_modules/bootstrap/scss/bootstrap"; in first place and replaced the ~
notation with node_modules/ instead.



Related Topics



Leave a reply



Submit