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 trialWouter Vermeersch
6,913 Pointswwwroot not there
The wwwroot folder is not there ... although I directly downloaded the package from the teachers notes (link)
1 Answer
Seth Kroger
56,414 PointsThere won't be a wwwroot folder initially because you haven't run 'npm install/
npm run buildto build it for you. Node based projects are reasonably self-contained. There is always a file called
package.jsonthat has a list of the libraries and tools the project uses among other things. They need to be installed for the project, and that is what the running the command
npm installin the project directory does. It goes through the
package.jsonfile and installs all the packages listed in dependencies and devDependencies into the project in the
node_modules` folder. It should be the first command run whenever you download a project.
Once that goes through you should be able to run npm run serve
and wait for the server to spin up and compile the project before viewing. If there are any problems in this step or the previous one there should be an error message in the terminal about it. Just leave the dev server running and it will detect when you save a file to automatically recompile/reload the page.