Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Juan Correa
Juan Correa
3,451 Points

Laravel Problem: * The host path of the shared folder is missing: ~/Code How can I fix this?

Laravel Problem:

  • The host path of the shared folder is missing: ~/Code

How can I fix this?

6 Answers

Shane Meikle
Shane Meikle
13,188 Points

If this is the section you are referring to:

folders:
    - map: ~/Code
      to: /home/vagrant/Code

then the - map: ~/Code part needs to be changed to the path of where you are housing your project files on your local machine. So, for example, mine looks like:

folders:
    - map: D:\wamp\www\Sites\Cantr\cantrtools
      to: /home/vagrant/Code
Juan Correa
Juan Correa
3,451 Points

My homestead.yaml file looks like this:

folders:
    - map: /Users/juanestebancorrea/Homestead/Projects
          to: /home/vagrant/Sites

but I keep getting the same error.

Shane Meikle
Shane Meikle
13,188 Points

What OS are you using for your host machine?

And is there a ~/Code directory listed anywhere else in the yaml file?

Juan Correa
Juan Correa
3,451 Points

MacOs, no ~/Code directory is not listed on the yaml file

Shane Meikle
Shane Meikle
13,188 Points

That is odd then. The yaml file was saved after making the changes to the path? (only want to eliminate obvious things first).

Juan Correa
Juan Correa
3,451 Points

Yes Shane, it was saved.

Juan Correa
Juan Correa
3,451 Points

Thank you Shane, I fix the problem. I deleted the homestead.yaml file, then I ran the bash init.sh command, and the vagrant up line worked!

Shane Meikle
Shane Meikle
13,188 Points

Glad to hear it. You will be happy to hear that this was probably the hardest part of the whole process.

Juan Correa
Juan Correa
3,451 Points

I hope so. Thanks again!