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

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

问题描述

我设置了一个使用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不创建符号链接。不幸的是,我仍然有错误创建符号链接。那里他有一个bug?

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 ?

推荐答案

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


可以防止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安装选项不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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