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 trialJonathan Ankiewicz
17,901 PointsNot recognizing the components
I downloaded the code and tried to implement it. keep getting syntax error and I have no idea how to fix it. I didn't touch the code but I tried a varition of fixes but it doesn't make sense.
```ERROR in ./index.js Module build failed: SyntaxError: Unexpected token (6:2)
4 | 5 | render(
6 | <Scoreboard />, | ^ 7 | document.getElementById('root') 8 | );
@ multi main webpack: bundle is now VALID.```
1 Answer
Seth Kroger
56,414 PointsIs there a .babelrc
file in the project directory? It should have this content:
{
"presets": ["react", "es2015", "stage-0"]
}
Jonathan Ankiewicz
17,901 PointsJonathan Ankiewicz
17,901 PointsNope, no babel file
Seth Kroger
56,414 PointsSeth Kroger
56,414 PointsIf you copy/move the files instead of the whole project folder it doesn't come along because dot files are normally hidden. Adding that file back should fix the issue.
Jonathan Ankiewicz
17,901 PointsJonathan Ankiewicz
17,901 PointsDidn't even think of it... That' what I get for working at 1 am in the morning. Thanks .