What is the purpose of .bin folder in node_modules?

That is a folder where binaries (executables) from your node modules are located.

NPM site states:

Executables When in global mode, executables are linked into
{prefix}/bin on Unix, or directly into {prefix} on Windows.

When in local mode, executables are linked into ./node_modules/.bin so
that they can be made available to scripts run through npm. (For
example, so that a test runner will be in the path when you run npm
test.)

Leave a Comment