我开始玩urigo/angular2-meteor-base,按照官方教程,现在想测试一个前端css框架。经过一些谷歌搜索后,我选择poetic:materialize-scss,但我在导入scss文件时遇到了一些问题。
从官方文档安装:
meteor add fourseven:scss
meteor add poetic:materialize-scss
然后在client / styles / main.scss中导入scss:
@import "{poetic:materialize-scss}/sass/materialize.scss";
在项目文件夹中运行meteor
后,我收到以下错误:
Errors prevented startup:
While determining active plugins:
error: conflict: two packages included in the app (fourseven:scss and angular2-compilers) are both trying to handle *.scss
error: conflict: two packages included in the app (fourseven:scss and angular2-compilers) are both trying to handle *.sass
所以我尝试删除fourseven:scss
并再次运行meteor
:
Errors prevented startup:
While processing files with angular2-compilers (for target web.browser):
/client/styles/main.scss: Scss compiler error:
File to import {poetic:materialize-scss}/sass/materialize.scss not found in file:
/home/vagrant/Projects/NgMeteor/{}/client/styles/main.scss
这是已安装的软件包列表:
angular2-compilers 0.6.6
autopublish 1.0.7
dispatch:mocha-phantomjs 0.1.9
es5-shim 4.6.15
hwillson:stub-collections 1.0.3
insecure 1.0.7
meteor-base 1.0.4
mobile-experience 1.0.4
mongo 1.1.14
poetic:materialize-scss 1.97.6_1
practicalmeteor:mocha 2.4.5_6
reactive-var 1.0.11
shell-server 0.2.1
standard-minifier-css 1.3.2
standard-minifier-js 1.2.1
tracker 1.1.1
xolvio:cleaner 0.3.1
不确定我是否从正确的位置导入scss文件...是否有人遇到同样的问题?
答案 0 :(得分:1)
我不知道如何包含meteor包scss,但我知道如何包含一个npm包,所以你可以通过npm npm install materialize-css安装它然后包含它。似乎位于https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss,所以你应该可以做到 @import" {} / node_modules / materialize / sass / materialize.scss&#34 ;; 另外,你知道https://github.com/angular/material2吗?我推荐使用它。