2017-05-28 39 views
0

我使用貓鼬連接到mongo數據庫。貓鼬NPM包是巨大的,包含日誌

我想明白爲什麼node_modules/mongoose越過1GB ... 當我檢查裏面有什麼,我得到3個鉅額文件夾(31000,31001,31002)有什麼似乎是日誌,即使有新的重新安裝...

$ 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 

這是什麼?我如何擺脫它?

回答

2

看起來[email protected]被髮布到包含這些數據庫文件的NPM庫(這當然不應該發生的)。

我已經聯繫了作者,但現在,你可以使用以前的版本:

npm i [email protected] 
+0

謝謝!讓我發瘋了!我分叉回購並在現在安裝包時使用了git地址。將對您創建的問題添加評論,以提供更多見解。 –

0

嘗試安裝最新版本的Mongoose。對於在本地計算機上的明確NPM緩存:

npm remove mongoose 
npm cache clean 
npm install mongoose