2016-05-26 17 views
0

我已经在angular2种子(https://github.com/mgechev/angular2-seed)中集成了sass suport,并且还安装了susy表单npm(npm install susy --save-dev),但是当我导入susy表单.scss文件时,它给出了以下错误集成susy suport在anglar2种子

[13:01:16] Starting 'build.html_scss'... 
Error in plugin 'sass' 
Message: 
    src/client/css/main.scss 
Error: File to import not found or unreadable: ~susy 
     Parent style sheet: /home/jorin/WebStormWorkSpace/nylndaUI/src/client/css/main.scss 
     on line 1 of src/client/css/main.scss 
>> @import "~susy"; 
^

[13:01:16] Finished 'build.html_scss' after 218 ms 

任何人谁可以指导我,我做错了什么?

+0

的可能的复制[要导入未找到或无法读取文件:超对称(http://stackoverflow.com/questions/13022956/file-to-import-not-found-or- unreadable-susy) – Benson

+0

您可能需要安装s用作搓宝石。看到http://stackoverflow.com/questions/13022956/file-to-import-not-found-or-unreadable-susy – Benson

+0

配置susy与config.rb文件和指南针工作正常,但我想弄清楚我如何使用基于gulp的构建系统的susy使用gulp-sass来加载susy(正如我所猜测的那样)并在我的项目中使用susy gird系统 – Jorin

回答

3

在您的文章中,更正susy的路径。

这可能是

@import "~susy/sass/susy"; 

Susy install Guide suggests to use bower并使用相对路径。

bower install susy --save 
@import "../bower_components/susy/sass/susy"; 

但没有理由你不能使用的路径,您的NPM安装的超对称:

@import "../node_modules/susy/sass/susy"; 

如果你采取这种方法,此文件是相对于你的SASS文件,所以它可以像

@import "../../../../node_modules/susy/sass/susy";