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 Angular Basics Setting Up an Angular Application Your First Angular Application

wwwroot not there

The wwwroot folder is not there ... although I directly downloaded the package from the teachers notes (link)

1 Answer

Seth Kroger
Seth Kroger
56,403 Points

There 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 calledpackage.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 commandnpm installin the project directory does. It goes through thepackage.jsonfile and installs all the packages listed in dependencies and devDependencies into the project in thenode_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.