B
B
bormor2017-08-14 15:54:23
Sass
bormor, 2017-08-14 15:54:23

Bootstrap SASS. How to remove errors when generating sourcemap?

When you connect the SASS version of bootstrap to the project, the assembly breaks due to errors when generating the sourcemap.
How can this be fixed?
Error message

C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\source-map\lib\source-map-generator.js:277
      throw new Error('Invalid mapping: ' + JSON.stringify({
      ^

Error: Invalid mapping: {"generated":{"line":432,"column":10},"source":"bs-grid/bootstrap/mixins/_clearfix.scss","original":{"line":14,"column":-1},"name":null}
    at SourceMapGenerator_validateMapping [as _validateMapping] (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\source-map\lib\source-map-generator.js:277:13)
    at SourceMapGenerator_addMapping [as addMapping] (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\source-map\lib\source-map-generator.js:101:12)
    at C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\concat-with-sourcemaps\index.js:60:28
    at Array.forEach (native)
    at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\source-map\lib\source-map-consumer.js:155:14)
    at Concat.add (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\concat-with-sourcemaps\index.js:58:18)
    at DestroyableTransform.bufferContents [as _transform] (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\gulp-concat\index.js:68:12)
    at DestroyableTransform.Transform._read (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\readable-stream\lib\_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\readable-stream\lib\_stream_transform.js:170:83)
    at doWrite (C:\Users\user\Desktop\Проекты_fe\_fe-template_для-портфолио\node_modules\readable-stream\lib\_stream_writable.js:405:64)

Contents of the file mentioned in the error message
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
// contenteditable attribute is included anywhere else in the document.
// Otherwise it causes space to appear at the top and bottom of elements
// that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
// `:before` to contain the top-margins of child elements.
//
// Source: nicolasgallagher.com/micro-clearfix-hack
@mixin clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question