简体   繁体   中英

Module not found: Can't resolve 'react-dom/lib/ReactPerf' in '\node_modules\react-addons-perf'

I am using React and ReactDOM of version 16.0.0 and react-addons-perf 15.4.2 that is latest version. But i am gating this compile time error.

./node_modules/react-addons-perf/index.js Module not found: Can't resolve 'react-dom/lib/ReactPerf' in '....\\node_modules\\react-addons-perf'

To follow up on what Rei Dien said, the React 16 announcement mentions the following:

react-addons-perf no longer works at all in React 16. It's likely that we'll release a new version of this tool in the future. In the meantime, you can use your browser's performance tools to profile React components .

To put it simply, just npm uninstall react-addons-perf and everything should be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM