Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialolu adesina
23,007 PointsModule not found: Can't resolve 'react-router-dom'
my page wont load correctly keep getting this error
Module not found: Can't resolve 'react-router-dom'
i checked the package.json file and react-dom is there under dependencies
not sure whats going on
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsTry deleting and reinstalling your node modules rm -rf node_modules
and then reinstalling, either npm install
or yarn install
if you're using yarn.
1 Answer
olu adesina
23,007 Pointsthanks Brendan Whiting installed react-router-dom separately using npm i react-router-dom command
Dan Wall
7,852 PointsThanks, Brendan and Olu. I ran into the same problem and using "rm -rf node_modules" and then "npm i react-router-dom" fixed it for me.
Daniel Baker
15,369 PointsDaniel Baker
15,369 PointsAdd the json and the code where you are importing it for us to see?