npm install: when to use --no-bin-links?

Vijey picture Vijey · Aug 23, 2016 · Viewed 21.1k times · Source

When and why we should use the option --no-bin-links when we install npm packages?

The official docs say:

The --no-bin-links argument will prevent npm from creating symlinks for any binaries the package might contain.

But it is still unclear to me for which scenarios we have to specify this.

What will be the impact of the specifying of this option on the functionality of the package? Will the package when used error out?

Answer

Andy Theos picture Andy Theos · Aug 23, 2016

One scenario that I can think of is working with a virtual machine (i.e. vagrant w/ virtual box or VMware) on windows host.
You can't translate symlinks to a synchronized folder on Windows share, so you will need this option to go around it.

Use it for any filesystem that doesn’t support symbolic links.