猫鼬NPM软件包很大,包含日志 [英] Mongoose NPM package is HUGE and contains logs
问题描述
我正在使用猫鼬连接到mongo数据库.
I'm using mongoose to connect to a mongo database.
我想了解为什么node_modules/mongoose
超过1GB ...
当我检查里面的东西时,我得到了3个巨大的文件夹(31000、31001、31002),里面似乎是日志,即使重新安装也是如此.
I'd like to understand why node_modules/mongoose
goes over 1gb...
And when I check what's inside, I get 3 huge folders (31000, 31001, 31002) with what seems to be logs, even with a fresh reinstall..
$ rm -Rf node_modules/mongoose
$ npm i mongoose
$ ls -al node_modules/mongoose/tools/31000/journal
total 614400
drwxr-xr-x 5 florian staff 170 May 28 08:48 .
drwxr-xr-x 27 florian staff 918 May 28 08:48 ..
-rw-r--r-- 1 florian staff 104857600 May 24 21:27 WiredTigerLog.0000000001
-rw-r--r-- 1 florian staff 104857600 May 24 08:06 WiredTigerPreplog.0000000001
-rw-r--r-- 1 florian staff 104857600 May 24 08:06 WiredTigerPreplog.0000000002
是什么?我如何摆脱它?
What is it ? How do I get rid of it ?
推荐答案
看来mongoose@4.10.3
已发布到包含那些数据库文件的NPM存储库中(当然不应该发生).
It looks like mongoose@4.10.3
was published to the NPM repository containing those database files (which of course shouldn't have happened).
我已经联系了作者,但是现在,您可以使用以前的版本:
I've contacted the author, but for now, you can use the previous version:
npm i mongoose@4.10.2
这篇关于猫鼬NPM软件包很大,包含日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!