react-redux安裝失敗的問題


剛試寫了一個react的項目,為了體驗一下react全家桶使用了 redux,但是redux想要配合react使用還需要 react-redux。

安裝命令: npm install react-redux --save 

但是在安裝react-redux的時候遇到了一個問題,安裝失敗,報錯如下

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AppData\Roaming\npm-cache_logs\2018-01-03T03_19_40_198Z-debug.log
Error: fatal error!

然后google了好久也沒找到確切的答案,最后怒從心頭起,惡向膽邊生,直接在package.json的dependencies字段里面手動加了這個 "react-redux": "^5" 然后執行 npm install 

這樣就安裝成功了。

至於具體的原因尚不了解。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM