2016-05-12 145 views
1

我一直在使用從幾年咕嚕現在,它已經像像下面的永遠我已經看到警告:其實npm WARN棄用xxx:我該怎麼辦?

npm WARN deprecated [email protected]: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead. 
npm WARN deprecated [email protected]: [email protected]<2.0.0 is no longer maintained. Upgrade to [email protected]^3.0.0 
npm WARN deprecated [email protected]: [email protected]<3.0.0 is no longer maintained. Upgrade to [email protected]^4.0.0. 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v6.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: [email protected]<3.0.0 is no longer maintained. Upgrade to [email protected]^4.0.0. 

我的項目反正工作,即使這些警告。從第一天開始,lodash總是給我警告。

這裏的的package.json文件生成這些錯誤:

{ 
    "name": "xxx", 
    "version": "0.1.1", 
    "devDependencies": { 
    "autoprefixer": "^6.2.3", 
    "cssnano": "^3.4.0", 
    "grunt": "^0.4.5", 
    "grunt-browser-sync": "^1.5.3", 
    "grunt-contrib-clean": "^1.0.0", 
    "grunt-contrib-concat": "~0.5.0", 
    "grunt-contrib-copy": "^1.0.0", 
    "grunt-contrib-htmlmin": "^0.6.0", 
    "grunt-contrib-imagemin": "^1.0.0", 
    "grunt-contrib-sass": "~0.7.4", 
    "grunt-contrib-uglify": "~0.5.1", 
    "grunt-contrib-watch": "~0.6.1", 
    "grunt-critical": "^0.2.0", 
    "grunt-delete-sync": "0.0.2", 
    "grunt-newer": "^0.7.0", 
    "grunt-postcss": "^0.7.1", 
    "grunt-processhtml": "^0.3.13" 
    } 
} 

我猜有些模塊或依賴過時,但...

1)它爲什麼還在工作?忽視警告是否安全? 2)我怎麼知道哪個模塊已經過時,我應該怎麼做?

回答

1

棄用意味着它沒有進一步發展,但也不會再改變。如果一個模塊依賴於一個有缺陷的不推薦使用的軟件包,唯一的解決方法就是升級這個依賴。但是,沒有任何變化,它會一直工作。