Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File name is longer than the maximum allowed path length on this platform (4096) #918

Closed
hxnk opened this issue May 3, 2020 · 3 comments

Comments

@hxnk
Copy link
Contributor

hxnk commented May 3, 2020

I'm running into an issue after deploying code to an Ubuntu server, that is similar to the issue described here: laravel/framework#32254

It's suggested by dries, that the issue is caused by calling render() on a view where the template does not come from a file.

Render is being called here:

$output = $view->render();

The view template (not from a file) comes from here:

public static function livewire($expression)

I get the same File name is longer than the maximum allowed path length on this platform (4096) error on Ubuntu (not on MacOS) as mentioned in laravel/framework#32254, in case the rendered livewire content is relatively large. Smaller content doesn't give me problems.

file_exists(): File name is longer than the maximum allowed path length on this platform (4096): resources/views/&lt;div&gt; <here the entire rendered view is shown>

@hxnk
Copy link
Contributor Author

hxnk commented May 3, 2020

I found the cause for this; it is not related to Livewire.

For reference; I was using Laravel Blade Components and returning the template as a string from the render method, instead of a blade view template. Some of them were pretty long and caused this error.

@hxnk hxnk closed this as completed May 3, 2020
@f-liva
Copy link

f-liva commented Nov 2, 2020

There is any solution?

@dtokos
Copy link

dtokos commented Feb 12, 2021

Just stumbled onto this on my Ubuntu testing server. I'm generating large html tables using multiple builder classes.
In Laravel 8 you can return instance Htmlable for which Laravel provides HtmlString.

Not perfect solution, but it was good enough in my case.

https://github.com/laravel/framework/blob/5ab3464b8755293815e57c0de0829feaf7242aae/src/Illuminate/View/Component.php#L71-L73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants