試圖導入時,我收到以下錯誤反應的自舉模態分量到我的反應項目:導入反應的自舉模式的崩潰反應應用
ERROR in ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js 15:29-72
ERROR in ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js 13:29-72
ERROR in ./~/react-dom/lib/ReactDOMInvalidARIAHook.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/ReactDOMInvalidARIAHook.js 14:29-72
ERROR in ./~/react-dom/lib/instantiateReactComponent.js
Module not found: Error: Cannot resolve module 'react/lib/getNextDebugID' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/instantiateReactComponent.js 20:21-56
ERROR in ./~/react-dom/lib/ReactDebugTool.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/ReactDebugTool.js 16:29-72
ERROR in ./~/react-dom/lib/ReactChildReconciler.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/ReactChildReconciler.js 29:27-70 37:31-74
ERROR in ./~/react-dom/lib/flattenChildren.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/flattenChildren.js 26:27-70 42:33-76
ERROR in ./~/react-dom/lib/checkReactTypeSpec.js
Module not found: Error: Cannot resolve module 'react/lib/ReactComponentTreeHook' in /vagrant/node_modules/react-dom/lib
@ ./~/react-dom/lib/checkReactTypeSpec.js 29:27-70 71:37-80
當我刪除,我是從導入模態線react-bootstrap一切正常。
我的反應中的package.json版本如下:
「反應」: 「^ 0.13.3」, 「反應過來的自舉」: 「^ 0.31.0」, 「反應-DOM」 :「^ 15.5.4」,
你能否更新react-version到'15.5.4' too.Also得到最新的react-bootstrap版本 –
更新幫助,但現在我得到錯誤,因爲舊的反應語法,這在項目中更好。無論如何,我最初的問題解決了。 –
React v15.5.4起,引入了一些新的更改,導致React.createClass,React中的PropTypes被棄用,因此您應該轉移到最新的編寫方法。此外,如果您仍想使用舊技術,則可以使用以前的版本 –