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

Error in Scoreboard.js PropTypes: "'types' can only be used in a .ts file"

npm start throws an error message. I tried just downloading the code and using that, but the issue persists. The entire static propTypes declaration is underlined in red. Anyone else have the same issue?

2 Answers

Kevin Becerra
Kevin Becerra
14,243 Points

The Error you're getting is because you kept the semi colon in the code and that doesn't follow the guidelines set by ESlint changing it to an equals sign will fix this error you're getting. whatever you use doesn't break the application but if you want to have the error disappear you're gonna need the equals sign.

Hope this helps!

Maybe the video should be updated because I saw this question elsewhere regarding the same issue. This is very frustrating.

Jacob Smith
Jacob Smith
10,914 Points

@kzinser It is frustrating, but don't let that deter you. Finding those nuances in the languages is always gonna happen. Keep at it! But yes, the video should be updated. 🙈