离子角组件.core.scss错误 [英] ionic-angular components.core.scss error

查看:55
本文介绍了离子角组件.core.scss错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅从Ionic 2开始.我的第一个应用程序因错误而失败:

Just starting with Ionic 2. My first app fails with error:

错误:导入指令不能在控制指令或mixin中使用. 在node_modules/ionic-angular/components.core.scss的第34行上 @import"fonts/ionicons";

Error: Import directives may not be used within control directives or mixins. on line 34 of node_modules/ionic-angular/components.core.scss @import "fonts/ionicons";

任何人都遇到此问题,知道如何解决吗?非常感谢您的帮助!

Anyone encountered this problem and knows how to solve it? Would be very grateful for your help!

推荐答案

我为此找到了解决方案: 其中一个依赖项已更新(一个与sass相关的).为了在不更改节点模块下文件的情况下解决此问题,请对gulp-sass和node-sass使用特定版本.使用以下命令:

I found a solution for this: One of the dependencies has updated (one that is related to sass). In order to fix this issue without changing the files under node-modules is to use specific versions for gulp-sass and node-sass. Use the following commands:

npm install gulp-sass@2.2.0
npm install node-sass@3.4.2

这篇关于离子角组件.core.scss错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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