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
Adam Lyles Kauffman13,687 Points
couldnt get server to start
couldnt get the server to start for this application using the video files. i ran npm install to get the dependencies then when i tried npm start:
when i try with nodemon and the main in my package.json is app.js:
Jordan Russell8,099 Points
I had issues with this as well. I was able to fix it by re-installing express, pug, and nodemon by typing "npm install express" and so on in the terminal. By doing this, the version of these dependencies will be updated to the latest version in the package.json file and the program should then work.
Nick Rogerson11,746 Points
Yeah, Seth's answer was closest. You're in the wrong directory. The solution is to click on the "V2_starter_files_callbacks" and then "Open in Integrated Terminal" followed by npm install and then npm start in the terminal. Refresh in the browser and Bob's Your Uncle.
Seth Kroger56,409 Points
I'd double-check which directory you're in when you run npm/nodemon. The download package has subdirectories for each video, "V2...", "V3...", etc. Make sure the directory you run from has an app.js and a package.json file.
Nicholas Lansing8,901 Points
if you run npm install in the terminal it will install all needed dependencies from the package.json file included in the project files, that will let you run express, render pug, and use nodemon.
Typing 'npm install express' worked for me. I was stuck for a while. Thanks!