2016-03-09 82 views
6

我試圖升級到我的項目上使用[email protected]^4.4.0軟件包的新發布的[email protected]。 然而,當我嘗試運行升級文件(https://facebook.github.io/react/blog/2016/03/07/react-v15-rc1.htmlReact 15與React-redux不兼容

npm install --save [email protected] [email protected] 

中建議它有錯誤出現,因爲版本不兼容:

npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.7 
npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 

任何建議嗎?

+0

這已被提出作爲一張票。 https://github.com/reactjs/react-redux/issues/319 –

+2

順便說一下,你可以使用'npm @ 3.x',在這裏,對等關係的缺失只是一個警告而不是錯誤。 –

回答

13

我剛剛發佈了[email protected],它允許React 15作爲對等依賴項。

請注意,您可以使用不執行對等關係的[email protected]。這樣,您不必等待項目作者更新其軟件包。

+0

對不起,如果這是不合適的,但是......這是否意味着在教程中從React導入PropTypes將毫無問題地工作? – steviesama

+0

我看到你應該從prop-types包中獲取PropTypes。我不確定我完全理解依賴關係是如何編組的,或者我應該怎麼做才能讓它工作。 – steviesama