react-weui icon indicating copy to clipboard operation
react-weui copied to clipboard

使用react-weiui最新master分支,install之后start报错

Open weizeng opened this issue 8 years ago • 4 comments

错误同下(后来用0.4.1的版本 install 之后start 依然报错,如下)

ERROR in multi vendor Module not found: Error: Cannot resolve module 'react' in /Users/leo/Downloads/react-weui-0.4.1/example @ multi vendor

ERROR in ./~/react-dom/index.js Module not found: Error: Cannot resolve module 'react/lib/ReactDOM' in /Users/leo/Downloads/react-weui-0.4.1/node_modules/react-dom @ ./~/react-dom/index.js 3:17-46

ERROR in ./~/react-addons-css-transition-group/index.js Module not found: Error: Cannot resolve module 'react/lib/ReactCSSTransitionGroup' in /Users/leo/Downloads/react-weui-0.4.1/node_modules/react-addons-css-transition-group @ ./~/react-addons-css-transition-group/index.js 1:17-61

ERROR in ./example/app.js Module not found: Error: Cannot resolve module 'react' in /Users/leo/Downloads/react-weui-0.4.1/example @ ./example/app.js 17:13-29

最后用npm install react@^0.14.2 安装这个版本后start 就没有问题。 想问下,怎么样让master分支1.0.0可以install之后npm start起来?

weizeng avatar Aug 23 '17 08:08 weizeng

我的npm把本4.2 是否要更改成1.1.3

weizeng avatar Aug 23 '17 09:08 weizeng

我也出现这样的错误,请问解决了吗

linesoft avatar Sep 27 '17 06:09 linesoft

becase use https://github.com/weui/react-weui/blob/master/package.json#L110-L113

这点要说明,在npm1和2的版本中,peerDependencies是会被自动安装的,但是在3的版本中只会有警告。

the solution is:

npm install react react-dom

then will be ok.

ruoru avatar Jan 18 '18 03:01 ruoru

仍然没有解决

boyherohot avatar Mar 30 '18 03:03 boyherohot