Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos OS X Yosemite上的sass源代码映射问题_Macos_Sass_Gruntjs - Fatal编程技术网

Macos OS X Yosemite上的sass源代码映射问题

Macos OS X Yosemite上的sass源代码映射问题,macos,sass,gruntjs,Macos,Sass,Gruntjs,我最近更新了OSX Yosemite,现在,当我在项目中运行Grunt并更改sass文件时,我收到以下错误: Warning: Error: Error generating source map: couldn't determine public URL for the source stylesheet. No filename is available so there's nothing for the source map to link to. o

我最近更新了OSX Yosemite,现在,当我在项目中运行Grunt并更改sass文件时,我收到以下错误:

Warning: Error: Error generating source map: couldn't determine public URL for the source stylesheet.
         No filename is available so there's nothing for the source map to link to.
        on line  of standard input
  Use --trace for backtrace. Use --force to continue.

我没有对Grunt设置或sass进行任何其他更改:dist、依赖项保持不变等等。如果您能帮助解决此问题,我们将不胜感激。谢谢

这个问题可能有不止一个原因,也许这会对你有所帮助

在开始之前,请删除已编译的css

  • 将grunt contrib sass更新至最新版本
  • Sourcemap需要Sass 3.4.0,可以与gem安装Sass一起安装
  • 运行grunt sass任务并查看已编译的css

当所有内容都更新后,sourcemap将自动创建并可用。在浏览器中进行测试之前,请确保清空浏览器缓存。

我也有同样的问题。