Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,162 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,056 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.