Voyager: Missing storage symlink > symlink(): No such file or directory

Created on 22 Nov 2017  路  10Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.5.21
  • Voyager Version: 1.0
  • PHP Version: 7.1.10
  • Database Driver & Version: Mysql 14.14

Description:

After installing Voyager on a fresh Laravel installation, on the dashboard I notice the avatar icon in the top right is a broken link. Also the big warning at the top about the Missing storage symlink. So I click the fix it button and get the following error:

symlink(): No such file or directory

screen shot 2017-11-22 at 11 33 44 am

Most helpful comment

try to delete existing storage symbolic link and then try php artisan storage:link command

All 10 comments

Sounds like you're not using a standard laravel install.... Is this a local install or hosted somewhere?

It's installed in Vagrant using Homestead. I installed it just doing:

# laravel new admin

Just a normal Laravel installation. Is it a user permission problem?

Also seeing this issue: https://github.com/laravel/internals/issues/34

Not sure what the solution is.

This was a result of me moving the project directory elsewhere. It looks like Laravel creates a symlink using an absolute path for some reason. I destroyed the symlink and created a new one using artisan storage:link. Weird I have to do that but it's a Laravel problem, not Voyager problem.

Laravel creates a symlink at public_path('storage') and points it at storage_path('app/public'), so you just need to make sure your paths are set appropriately. But I agree, Laravel issue, not Voyager. Glad you got it working!

try to delete existing storage symbolic link and then try php artisan storage:link command

@sujalpatel022 Thanks yes that is the obvious solution. The problem is that Laravel shouldn't be making an absolute path but rather a relative one.

@Jakobud, it's not a laravel problem. It just creates a file system symlink. Symlinks don't always work well with relative references, so absolute links work much better. In either case, pushing those links to a remote server will not work, so they'll still need to be recreated

If you're using laradock, make sure you run php artisan storage:link inside the workspace bash

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

winex01 picture winex01  路  3Comments

IvanBohonosiuk picture IvanBohonosiuk  路  4Comments

rayqiri picture rayqiri  路  3Comments

iwasherefirst2 picture iwasherefirst2  路  3Comments

ferrywae picture ferrywae  路  4Comments