2017-03-04 91 views
0

我运行CMD:离子2警告:[波旁] [弃用]

ionic serve 

和我的应用程序运行非常好。但我有[警告] [50]的警告[弃用]。警告是这样的:

WARNING: [Bourbon] [Deprecation] `justify-content` is deprecated and will be removed in 5.0.0. We suggest using an autom 
ated prefixing tool, like Autoprefixer. 
Backtrace: 
     node_modules/bourbon/app/assets/stylesheets/_bourbon-deprecate.scss:10, in mixin `-bourbon-deprecate` 
     node_modules/bourbon/app/assets/stylesheets/_bourbon-deprecate.scss:17, in mixin `-bourbon-deprecate-for-prefixi 
ng` 
     node_modules/bourbon/app/assets/stylesheets/css3/_flex-box.scss:239, in mixin `justify-content` 
     src/theme/common/inputs/rating.scss:16, in mixin `rating-item-styles` 
     src/pages/maps/maps.scss:213 

那么是什么问题?如何解决它?

我使用离子2角2

我有这样的:

"dependencies": { 
    "@angular/common": "2.2.1", 
    "@angular/compiler": "2.2.1", 
    "@angular/compiler-cli": "2.2.1", 
    "@angular/core": "2.2.1", 
    "@angular/forms": "2.2.1", 
    "@angular/http": "2.2.1", 
    "@angular/platform-browser": "2.2.1", 
    "@angular/platform-browser-dynamic": "2.2.1", 
    "@angular/platform-server": "2.2.1", 
    "@ionic/storage": "1.1.7", 
    "@types/googlemaps": "^3.26.2", 
    "bourbon": "^4.3.3", 
    "ionic-angular": "2.0.0-rc.5", 
    "ionic-native": "2.2.11", 
    "ionicons": "3.0.0", 
    "rxjs": "5.0.0-beta.12", 
    "sw-toolbox": "3.4.0", 
    "zone.js": "0.6.26" 
    }, 
+0

它基本上说了一切。您正在使用波旁图书馆的方法,这将在未来的版本中被弃用(删除)。你必须在某些时候安装了Bourbon'npm install bourbon',并在你的代码中使用'justify-content'。 – Zoon

+0

你可以在问题中显示你的package.json吗?你可能需要更新'波旁图书馆 –

+0

@suraj我添加了部分依赖关系 –

回答

0

你居然不要求与离子2波旁作为默认的构建堆栈here使用Autoprefixer

如果你还在使用它的任何理由,检查changelog。所有的混入将在版本5对于目前的版本中删除,你可以尝试:

$output-bourbon-deprecation-warnings: false; 
@import "bourbon"; 

提到here

如果您选择不升级,您可以通过 禁用波本与不赞成使用的Sass警告的输出来减少对日志的污染。

这个变量必须在导入Bourbon之前声明。

+0

我添加了字符串来禁用波旁的弃用相关Sassa warings的输出,但是我只有这个字符串:autoprefixer: 72217:3:你应该写最后的规格而不是display:block来显示:flex。它重复20次.. –

+0

可能与CSS的一些问题。你可能不得不用scss部分来形成一个问题。 –

+0

好的男人。无论如何谢谢你 –