没有符号链接的 npm install 选项不起作用 [英] npm install without symlinks option not working

查看:21
本文介绍了没有符号链接的 npm install 选项不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Windows 8 和 Ubuntu 作为虚拟机设置了一个开发环境.为此,我使用 VirtualBox.

I setup a development environment with Windows 8 and Ubuntu as a virtual machine. For that I use VirtualBox.

我还设法在 VirtualBox 中创建了一个共享文件夹.

I also manage to create a shared folder in VirtualBox.

在这个共享文件夹中,我尝试使用 Yeoman 的 ember-generator 启动一个项目.

In this shared folder I try to start a project with ember-generator of Yeoman.

yo ember --skip-install --karma
npm install --no-bin-links

为了安装模块 NPM,我使用选项--no-bin-links"不创建符号链接.不幸的是,我仍然有错误创建符号链接......虽然这个选项是我使用的吗?他有一个错误吗?

For installing modules NPM I use the option "--no-bin-links" not to create symbolic links. Unfortunately, I still have errors creations symbolic links ... Is what I use although this option ? There he has a bug ?

推荐答案

NPM 文档关于参数--no-bin-links"说:

The NPM docs about parameter "--no-bin-links" say:

将阻止 npm 为包中的任何二进制文件创建符号链接可能包含.

will prevent npm from creating symlinks for any binaries the package might contain.

这只会导致 NPM 不在 node_modules/.bin 文件夹中创建链接.我还搜索了一种方法来防止 NPM 在使用 npm install ../myPackage 时创建符号链接,但找不到任何解决方案...

Which will just cause NPM to not create links in the node_modules/.bin folder. I also searched for a way to prevent NPM from creating symlinks when using npm install ../myPackage, but can't find any solution...

更新: npm 支持团队表示这将重现旧行为(无符号链接):

Update: The npm support team said this will reproduce the old behaviour (no symbolic links):

npm install $(npm pack <folder> | tail -1)

在 Windows 10 上的 git-bash 中对我有用.

Works for me in git-bash on Windows 10.

这篇关于没有符号链接的 npm install 选项不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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