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!

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 React by Example Refining the App Refactor App Components: Solution

Haitian Zou
Haitian Zou
1,967 Points

Why the console compiles after typing "npm start"?

So I typed "npm start" in the terminal and the console compiled. What's the reason behind that? Thanks for replying. ;)

1 Answer

Mark Westerweel
.a{fill-rule:evenodd;}techdegree seal-36
Mark Westerweel
Full Stack JavaScript Techdegree Graduate 22,378 Points

For anyone interested:

There is a script started by NPM start.

it is defined in the package.JSON:

"scripts": {
    "start": "react-scripts start",

This allows you to start the app in the browser, similar to node [app.js] in node.js . It will be your first line of defense to check if it actually compiles.