From fa0f8de0b4e1d5982c8ef51b934571cbbde204f9 Mon Sep 17 00:00:00 2001 From: Giovanni Tirloni Date: Fri, 4 Nov 2016 17:35:05 -0200 Subject: [PATCH] GPII-2060 - Bind mount node_modules in /var/tmp --- Vagrantfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index a128e1f69a..184120aeb6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -29,6 +29,13 @@ Vagrant.configure(2) do |config| # Your working directory will be synced to /home/vagrant/sync in the VM. config.vm.synced_folder ".", "#{app_directory}" + # Mounts node_modules in /var/tmp to work around issues in the VirtualBox shared folders + config.vm.provision "shell", run: "always", inline: <<-SHELL + sudo mkdir -p /var/tmp/#{app_name}/node_modules #{app_directory}/node_modules + sudo chown vagrant:vagrant -R /var/tmp/#{app_name}/node_modules #{app_directory}/node_modules + sudo mount -o bind /var/tmp/#{app_name}/node_modules #{app_directory}/node_modules + SHELL + # List additional directories to sync to the VM in your "Vagrantfile.local" file # using the following format: # config.vm.synced_folder "../path/on/your/host/os/your-project", "/home/vagrant/sync/your-project"