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 trialValeshan Naidoo
27,008 PointsError: Cannot find module 'express' when trying 'npm start'.
I'm using workspaces, so the file paths and locations should be the same as Andrew's but for some reason I'm getting this error.
It's saying that the error is at
> blog@1.0.0 start /home/treehouse/workspace
> node ./bin/www
module.js:549
throw err;
Not sure what to do, I've had a look at the www file but it doesn't look any different from the file Andrew was working with, and I applied the code the same as well, plus we didn't interfere with express. And I don't know where module.js is.
1 Answer
Adam Beer
11,314 PointsFirst, npm install express, second, npm start. Now what's happened?
Valeshan Naidoo
27,008 PointsValeshan Naidoo
27,008 PointsThat worked, thanks! I'm sure I did this before but because the workspace keeps losing connection and refreshing, maybe that's whats causing it to screw up, but now its another module 'serve-favicon'. I'm just doing
npm install
, seems to be that no dependencies were installed.