Skip to content
This repository has been archived by the owner on May 13, 2019. It is now read-only.

Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/Animated @ ./~/react-web/Libraries/Animated/Animated.web.js 14:27-69 #255

Open
Aggie123 opened this issue Jun 14, 2017 · 2 comments

Comments

@Aggie123
Copy link

这是什么问题,求解
有所是react,react-dom版本不匹配,也按安卓react-web-demo同样的版本要求安装了还是同样的问题
ERROR in .//react-web/Libraries/Animated/Animated.web.js
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/Animated
@ ./
/react-web/Libraries/Animated/Animated.web.js 14:27-69

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/EventPluginRegistry' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 8:25-65

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/ResponderEventPlugin' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 9:26-67

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/EventConstants' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 10:20-55

ERROR in .//react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js
Module not found: Error: Cannot resolve module 'react/lib/ResponderTouchHistoryStore' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/PanResponder
@ ./
/react-web/Libraries/PanResponder/injectResponderEventPlugin.web.js 11:32-79

ERROR in .//react-web/Libraries/Utilties/setNativeProps.web.js
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /Users/nana/workspace/AMi/MjuiExample/node_modules/react-web/Libraries/Utilties
@ ./
/react-web/Libraries/Utilties/setNativeProps.web.js 8:26-68

package.json文件依赖包如下:
"dependencies": {
"antd-mobile": "^1.2.0",
"mjui": "^0.0.8",
"react": "16.0.0-alpha.6",
"react-dom": "^15.5.4",
"react-native": "0.44.0",
"react-native-scrollable-tab-view": "^0.6.6",
"react-navigation": "^1.0.0-beta.9",
"react-static-container": "^1.0.1",
"react-web": "0.4.6",
"url-loader": "^0.5.9"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"babel-jest": "20.0.0",
"babel-loader": "^6.2.5",
"babel-plugin-import": "^1.2.1",
"babel-preset-react-native": "^1.9.0",
"babel-preset-stage-1": "^6.16.0",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-react": "^7.0.1",
"haste-resolver-webpack-plugin": "^0.2.2",
"jest": "20.0.0",
"json-loader": "^0.5.4",
"react-hot-loader": "^3.0.0-beta.7",
"react-test-renderer": "16.0.0-alpha.6",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.1",
"webpack-html-plugin": "^0.1.1"
},
"jest": {
"preset": "react-native"
}

@cpunion
Copy link

cpunion commented Jun 19, 2017

react 和 react-dom 用 15.3 版本。

@cpunion
Copy link

cpunion commented Jun 19, 2017

如果是为了和 react-native 共享代码库,我建议 web项目单独开个目录,里面package.json用不同的react和react-dom版本。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants