fullstackreact / react-yelp-clone

Tutorial: Build a Yelp-clone in React
https://www.fullstackreact.com/articles/react-tutorial-cloning-yelp/
MIT License
840 stars 218 forks source link

Is there a better way to debug webpack errors? #9

Closed craigmulligan closed 8 years ago

craigmulligan commented 8 years ago

I assume this is a webpack issue, but I thought I'd ask, I had an issue where I was importing a component that didn't exist in this case import Rating from 'components/Rating/Rating'; I assumed it'd throw module not found or smthing but instead I got an enzyme error which doesn't make much sense besides the fact that enzyme wouldn't be able to render that element, wondering if there are any quick wins to make webpack debugging easier?

ERROR in ./~/enzyme/build/react-compat.js
Module not found: Error: Cannot resolve module 'react/addons' in /Users/gaudi/work/tutorials/yelp/node_modules/enzyme/build
 @ ./~/enzyme/build/react-compat.js 37:16-39

ERROR in ./~/enzyme/build/react-compat.js
Module not found: Error: Cannot resolve module 'react/lib/ReactContext' in /Users/gaudi/work/tutorials/yelp/node_modules/enzyme/build
 @ ./~/enzyme/build/react-compat.js 38:23-56

ERROR in ./~/enzyme/build/react-compat.js
Module not found: Error: Cannot resolve module 'react/lib/ExecutionEnvironment' in /Users/gaudi/work/tutorials/yelp/node_modules/enzyme/build
 @ ./~/enzyme/build/react-compat.js 68:4-45