2017-03-04 88 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

好的男人。無論如何謝謝你 –