node icon indicating copy to clipboard operation
node copied to clipboard

OpenSSL include files double NodeJS install size, starting with Node 18

Open jdmarshall opened this issue 2 years ago • 1 comments

Version

No response

Platform

Linux 02e1190386f1 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 Linux

Darwin C02YR4FKLVDQ 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64

Subsystem

No response

What steps will reproduce the bug?

Examine Docker images

  • node:20-alpine3.16
  • node:16-alpine3.16

or

  • ~/.nvm/versions/node/v16.19.1
  • ~/.nvm/versions/node/v18.16.1

du -sk | sort -n

down through the directories, you'll find an extra 48-54 MB of cross platform include files in

/usr/local/include/node/openssl

How often does it reproduce? Is there a required condition?

Node 18 and Node 20, all versions

What is the expected behavior? Why is that the expected behavior?

Don't bloat out Node with unused header files

What do you see instead?

A different way to link files, or a tarball perhaps

Additional information

No response

jdmarshall avatar Jun 23 '23 16:06 jdmarshall

Duplicate of https://github.com/nodejs/node/issues/46451. There was a previous attempt to reduce the size but it caused problems and was reverted https://github.com/nodejs/node/issues/46451#issuecomment-1411120396.

richardlau avatar Jun 23 '23 17:06 richardlau