From 8e1d9a98f29d83fb30f24f2614f32e01cd2b3817 Mon Sep 17 00:00:00 2001 From: Giovanni Tirloni Date: Fri, 4 Nov 2016 17:32:08 -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 daf911e..2178e57 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"