Vagrant dies when downloading packages with npm. #4650

Closed
ealtamir opened this Issue Feb 11, 2014 · 5 comments

Projects

None yet

4 participants

@ealtamir

Hello, I'm having a problem where NPM is killing my vagrant instance. I'm using vagrant to simulate production environment.

It's simulating archlinux with 512mb of ram. To be able to run npm as non-root I had to install it through the source using a PKGBUILD file. It might also be a problem with VirtualBox and vagrant. Since I'm not sure what it could be i'm going to assume that it's npm.

The output is the following:

Downloading files normally...
.
.
.
npm http 200 https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz
npm http 200 https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz
Connection to 127.0.0.1 closed by remote host.
Connection to 127.0.0.1 closed.  

Vagrant dies... I have to do 'vagrant up' to restart it.

@jp1987
jp1987 commented Feb 21, 2014

I have the same issue, dies during downloading the files with the same message.

Using a Debian 7 VirtualBox environment on an Ubuntu 12.04 machine.

@jp1987
jp1987 commented Feb 21, 2014

I fixed it by using the following workaround:

config.vm.provider "virtualbox" do |v|
v.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
end

@ealtamir
ealtamir commented Mar 1, 2014

jp, after adding the workaround to my vagrant file I was able to donwload the npm packages. Thanks!

Could you elaborate on how did you come up with this fix?

@jp1987
jp1987 commented Mar 3, 2014

Take a look at this ticket: https://www.virtualbox.org/ticket/11649

@othiym23 othiym23 added the support label Nov 26, 2014
@othiym23
Contributor

Looking at this issue, this doesn't actually look like a problem with npm, but rather with it doing things in a way that cause(d?) Vagrant to go off to the moon. As such, I'm closing this ticket as more or less as resolved as the npm team can get it. Sorry it took so long for this issue to get somebody's attention!

@othiym23 othiym23 closed this Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment