Initially I was just trying to run a demo app to practice mongoose. The app, cats.js, would not run with node because I would get this error:
module.js:540
throw err;
^
Error: Cannot find module './timestamp'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/taylorlassiter/Desktop/visual_studio/yelp_camp/node_modules/bson/lib/bson/bson.js:6:15)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
Unfortunately, the ./timestamp module appeared in all the places listed in the error.
I read How do I resolve "Cannot find module" error using Node.js? to try to fix it and ended up running "rm -rf node_modules" which removed all node_modules. When I tried to reinstall with "npm install", I get these errors:
npm WARN bootstrap@4.0.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.0.0 requires a peer of popper.js@^1.12.9 but none is installed. You must install peer dependencies yourself.
I haven't seen any answers regarding these two errors.
My first priority is getting npm reinstalled. My second priority would be to figure out the original error I was receiving when trying to run cats.js, but I can create a new question for that.