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 trial

JavaScript Building Applications with React and Redux Modularizing the React Scoreboard Application Building the AddPlayerForm Logical Component

Brice Tessier Huort
PLUS
Brice Tessier Huort
Courses Plus Student 916 Points

I have an issue when restarting the webpack server. It doesn't find files in src/components.

It can't find files Scoreboard, Stopwatch etc... in src/components/... I guess this is problem with webpack extensions or something like that... Any ideas ?

2 Answers

Tom Geraghty
Tom Geraghty
24,174 Points

Are you sure you're using the right relative paths?

'src/components/'
'/src/components/'
'./src/components/'
'../src/components/'
'../../src/components/'

That'd be a good first place to check. Otherwise "turning it off and on again..."

Daniel Stephany
Daniel Stephany
32,059 Points

Did you move your index.js file out of src? If you are using create-react-app it looks for your index.js in the root of your src folder then the index.js should import scoreboard from within components.