Node.js error Error: Cannot find module 'mongoose'


Question

C:\Users\Nick\Desktop\turntablefm\Bots\Super Bot>node bot.js

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot find module 'mongoose'
    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (C:\Users\Nick\Desktop\turntablefm\Bots\Super Bot\db.j
s:1:78)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)

I already installed it using npm install and I tried reinstalling but that didn't work any ideas?

1
28
11/27/2017 10:23:59 PM

trying installing using this command :

npm install mongoose

do not use the -g switch.

BTW: I ran command prompt in admin mode.

http://prazjain.wordpress.com/2012/04/24/node-js-error-error-cannot-find-module-xyz/

42
4/24/2012 9:47:05 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon