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.

Brendan Whiting
Front End Web Development Techdegree Graduate 84,696 PointsWhy did "node .bin/www" throw an error?
Brendans-MacBook-Pro:TESTAPP brendan.whiting$ node .bin/www
module.js:327
throw err;
^
Error: Cannot find module '/Users/brendan.whiting/Projects/TESTAPP/.bin/www'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3
Brendans-MacBook-Pro:TEXTAPP brendan.whiting$ npm start
> TESTAPP@0.0.0 start /Users/brendan.whiting/Projects/TESTAPP
> node ./bin/www
GET / 200 445.632 ms - 170
GET / 200 24.364 ms - 170
GET /stylesheets/style.css 200 3.912 ms - 111
I did 'node .bin/www' and got an error. npm start did work. I'm just wondering why the other way didn't.
Sam Hall
Courses Plus Student 8,636 PointsSam Hall
Courses Plus Student 8,636 PointsHi Brendan,
You're missing a slash.
It should be node ./bin/www not node .bin/www.
The error comes because there is no folder called .bin. You could also use node bin/www.
Sam