0

When I start my npm start command its throwing this error after debugging code. Will any buddy help me to resolve this issue. For further explanation see the debugged code in the picture shared.

CODE(Exception):

var filename = Module._findPath(request, paths, isMain);

if (!filename) {
    var err = new Error(`Cannot find module '${request}'`);
    err.code = 'MODULE_NOT_FOUND';
    throw err;

enter image description here

Vivek Molkar
  • 3,910
  • 1
  • 34
  • 46
  • possible duplicate of https://stackoverflow.com/q/8623205/1827276 – boly38 Oct 23 '18 at 21:23
  • should try to see if your project described his dependencies in a 'package.json' file. if yes, execute 'npm install' before'npm start' – boly38 Oct 23 '18 at 21:26

1 Answers1

0

So, from the error message, you don't have the mongoose module installed or you're not including the module when you are calling related functions. To fix:

npm install --save mongoose

Otherwise, add the Mongoose module to your project just as you would any other npm module.

Vivek Molkar
  • 3,910
  • 1
  • 34
  • 46
Husk Rekoms
  • 483
  • 12
  • 22