JavaScript Install and Use Sequelize CLI

Valeshan Naidoo
Valeshan Naidoo
26,992 Points

Error: 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
Adam Beer
11,262 Points

First, npm install express, second, npm start. Now what's happened?

Valeshan Naidoo
Valeshan Naidoo
26,992 Points

That 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.