Home » Php » laravel homestead the host path of shared folder missing error on windows 7

laravel homestead the host path of shared folder missing error on windows 7

Posted by: admin October 29, 2017 Leave a comment

Questions:

I am trying to set up laravel homestead on my windows 7 machine . I installed vagrant and virtualbox. Also the git bash shell.

did

vagrant box add laravel/homestead
composer global require "laravel/homestead=~2.0"

added composer vendor bin to environment variables.So, homestead command is now accessible from shell

homestead init   

I had edited my Homestead.yaml file and this is the configuration .

I have my laravel projects currently in the mentioned directory in the configuration . ie ( E:// ) directory

folders:
    - map: /e/Projects/Code/apache/laravel
      to: /home/vagrant/Projects

sites:
    - map: foober.dev
      to: /home/vagrant/Projects/foober/public

now whenever I do homestead up, I am getting the error

Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The host path of the shared folder is missing: /e/Projects/Code/apache/laravel

I have made sure that cd /e/Projects/Code/apache/laravel is working .I am not sure what I am missing here.Must be something silly, but any help would be appreciated.

Answers:

The error is simple. It’s telling you

The host path of the shared folder is missing: /e/Projects/Code/apache/laravel

Your shared folder is missing. According to your question. You are using window. So, window shouldn’t work like

cd /e/Projects/Code/apache/laravel

Should be like YourPartitionName:/Yourdirectory.

Example:

folders:
    - map: E:/Projects/Code/apache/laravel
      to: /home/vagrant/Projects

Questions:
Answers:

The local directory is missing.
Just type mkdir followed by the missing shared folder

eg. mkdir /e/Projects/Code/apache/laravel

Questions:
Answers:

Exemple:
in terminal

cd ~/.homestead
subl Homestead.yaml 

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /media/Arquivos/www/vagrant/Code
      to: /media/Arquivos/www/vagrant/Code

sites:
    - map: homestead.app
      to: /media/Arquivos/www/vagrant/Laravel

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

# blackfire:
#     - id: foo
#       token: bar