Node.js错误错误:无法找到模块'mongoose' [英] Node.js error Error: Cannot find module 'mongoose'

查看:194
本文介绍了Node.js错误错误:无法找到模块'mongoose'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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)

我已经使用npm install安装了它,我尝试重新安装但是没有任何想法?

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

推荐答案

尝试使用此命令安装:

npm install mongoose

不要使用-g开关。

BTW:我在管理模式下运行命令提示符。

BTW: I ran command prompt in admin mode.

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

这篇关于Node.js错误错误:无法找到模块'mongoose'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆