2017-04-24 89 views
0

版本未能建立DependencyGraph並未能建立DependencyGraph

"react": "16.0.0-alpha.6", 
"react-native": "0.43.4", 
"react-native-router-flux": "^3.38.1" 

一切工作完美,但安裝後react-native-router-flux 所有人都死給太多的錯誤。

Failed to build DependencyGraph: @providesModule naming collision: 
    Duplicate module name: react-native 
    Paths: C:\Users\ashik\Desktop\react_apps\Friends\node_modules\react-native-router-flux\node_modules\react-native\ 
ackage.json collides with C:\Users\ashik\Desktop\react_apps\Friends\node_modules\react-native\package.json 

This error is caused by a @providesModule declaration with the same name across two different files. 
Error: @providesModule naming collision: 
    Duplicate module name: react-native 
    Paths: C:\Users\ashik\Desktop\react_apps\Friends\node_modules\react-native-router-flux\node_modules\react-native\ 
ackage.json collides with C:\Users\ashik\Desktop\react_apps\Friends\node_modules\react-native\package.json 

我已經得到太多的問題和答案像這樣的錯誤,但是,我的陣營原生版本和錯誤不會是相同的或者我不明白的解決方案。請爲我製作一些更好的解決方案或細節。另外我是React-native中的新成員,並對Js做出反應。

回答

1

react-native-router-flux包中包含自己的(凍結)副本react-native,以便能夠使用來自react-nativenavigation-experimental API的穩定版本。這有時會導致與項目中使用的版本react-native發生衝突。另外,看起來react-native-router-flux3.38.1版本會導致react-native最近版本的一些問題。可能的解決方案是將react-native-router-flux降級到3.38.0版本。只要改變行

"react-native-router-flux": "^3.38.1" 

"react-native-router-flux": "3.38.0" 

package.json,然後刪除node_modules文件夾並運行npm install。舊版本不應該有這個問題。

reference issue in the project repo

+0

#Pedro_Castilho非常感謝你.....真的很幫助我,節省了我太多的時間儘管我已經嘗試了兩個多小時。 :) 我是** React-native **中的新人,如果你給我任何關於我的課程的建議,那對我來說將會很棒。 –