SASS任务中用source来评论:'map'产生'Assertion failed' [英] SASS task in gulp with sourceComments: 'map' produces 'Assertion failed'

查看:119
本文介绍了SASS任务中用source来评论:'map'产生'Assertion failed'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用AngularJS,D3,Pixi.js和gulp作为构建系统的Web应用程序。除了 gulp-sass 以外,它们都可以很好地协同工作。下面是相关的代码:

I have a web app I'm developing using AngularJS, D3, Pixi.js, and gulp as a build system. It all works great together, except gulp-sass. Here's the relevant code:

gulp.task('sass-dev', ['clean-dev'], function() {
  return gulp.src( cfg.appFiles.rootSass )
    .pipe( sass({ errLogToConsole: true }))
    .pipe( gulp.dest( cfg.buildDir+cfg.destDirs.css  ) )
    .pipe( livereload( server ) );
});

cfg 只是一个变量,水珠。如果我创建第三行

cfg is just a variable that has predefined globs. If I make the third line

 .pipe( sass({ errLogToConsole: true, sourceComments: 'map' }))

通过添加源映射(用于调试),我得到以下致命错误。

by adding the mapping of the source (useful for debugging), I get the following fatal error.

Assertion failed: (val->IsString()), function _NanGetExternalParts, file ../node_modules/nan/nan.h, line 1725.
Abort trap: 6

在我的同事的电脑上,映射。在我的情况下,每次映射源注释都会失败,并且无需映射即可完美工作。这两台电脑都是运行最新版本的节点 npm ), bower OS X

On my colleague's computer, it works perfectly with or without mapping. On mine, it fails every time with the source comments mapped, and works perfectly without mapping. Both computers are iMacs running the latest version of node (npm), bower, and OS X.

有什么想法可能导致这种情况?问题在 gulp gulp-sass 本身?

Any idea what could be causing this? Issue in gulp or gulp-sass itself?

推荐答案

这些选项适合我。

{ errLogToConsole: true, sourceComments: 'map', sourceMap: 'sass' }.

总会有一些奇怪的事情发生。

There's always seems to be something weird going on.

这篇关于SASS任务中用source来评论:'map'产生'Assertion failed'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆