node-rdkafka icon indicating copy to clipboard operation
node-rdkafka copied to clipboard

node_modules size more then 100mo

Open akselmi opened this issue 3 years ago • 5 comments

Hello, the size of node-rdkafka is about 167.9 Mo inside node_modules, i looked into it and i found that

node_modules/node-rdkafka/deps = 135.4 Mo node_modules/node-rdkafka/build/deps/librdkafka.a = 15.1 mo node_modules/node-rdkafka/build/deps/librdkafka.a = 5.7 mo

seems like removing them have no impact, everything work fine. is it possible please to make sure to delete them ?

akselmi avatar Feb 22 '22 17:02 akselmi

if you are containerizing your project, you can manually delete these libraries in your dockerfile after a npm install:

RUN rm -rf /full/path

tatianajiselle avatar Apr 14 '22 18:04 tatianajiselle

Per investigate ` bash-5.0# du -h -d 1

11.3M ./src-cpp

212.0K ./win32

59.3M ./src

76.0K ./debian

2.1M ./tests

1.7M ./packaging

160.1M ./examples

148.0K ./mklove

235.6M .

bash-5.0# pwd

/node_modules/node-rdkafka/deps/librdkafka ` example take 160 M Just a reference for you

Elsvent avatar Apr 29 '22 02:04 Elsvent

My experience today:

$ du -sm node-rdkafka # -m reports size in Mb
432     node-rdkafka
$ cd node-rdkafka
du -sm * | sort -rn       
366     deps
66      build # <--------------------------- Actually used by nodejs

Removing build stopped the runtime from working.

Removing deps has no effect on the runtime.

Would be great to clean up after the build in your package.json scripts

raymcdermott avatar Aug 03 '23 08:08 raymcdermott