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

问题描述

C:UsersNickDesktop	urntablefmBotsSuper 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:UsersNickDesktop	urntablefmBotsSuper Botdb.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?

推荐答案

尝试使用以下命令安装 mongoose:

try installing mongoose using this command:

npm install mongoose

不要使用 -g 开关.

do not use the -g switch.

顺便说一句:我在管理员模式下运行命令提示符.参考

BTW: I ran command prompt in admin mode. Reference

这篇关于Node.js 错误错误:找不到模块“猫鼬"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 18:09