Mongoose: Error cannot find module debug
For future visitors: You are probably missing a dependency. Make sure you run this first:
npm install
... before you run your app with npm start
or node <app>
I think this may happen if you have a child dependency on debug
through another package (for example express
or mongoose
) but you did not provide the dependencies' package.json files with the deployed application which makes node.js unable to locate debug
.