npm 安装:何时使用 --no-bin-links? [英] npm install: when to use --no-bin-links?

查看:101
本文介绍了npm 安装:何时使用 --no-bin-links?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装 npm 包时,我们何时以及为什么应该使用 --no-bin-links 选项?

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

官方文档说:

--no-bin-links 参数将阻止 npm 为包可能包含的任何二进制文件创建符号链接.

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?

推荐答案

我能想到的一个场景是在 Windows 主机上使用虚拟机(即 vagrant w/virtual box 或 VMware).
您无法将符号链接转换为 Windows 共享上的同步文件夹,因此您需要使用此选项来绕过它.

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.

这篇关于npm 安装:何时使用 --no-bin-links?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆