8000 Optimize command unable to locate vendor views, View:Cache · Issue #55769 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

Optimize command unable to locate vendor views, View:Cache #55769

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

Open
CamKem opened this issue May 18, 2025 · 3 comments
Open

Optimize command unable to locate vendor views, View:Cache #55769

CamKem opened this issue May 18, 2025 · 3 comments

Comments

@CamKem
Copy link
Contributor
CamKem commented May 18, 2025

Laravel Version

12.14.0

PHP Version

8.4.7

Database Driver & Version

MySQL

Description

As per the discussion in #50619 - when running the php artisan optimize command during deployment in forge, it is unable to find a cache some vendor views that are used in the main app. In this instance, I am using the heroicons that are a part of the blade-kit-ui that come as a dep of filament.

Image

As per the directions in the last issue about this (50619) I removed optimize command and replaced it with the standalone cache commands and it works fine.

It seems to be related to the $this->callAfterResolving call in the Blade Hero Icons package, but I don't have enough time at the moment to look into why it working with caching the views, but not the optimise command.

Steps To Reproduce

The following is a minimal reproduction:

  1. Create a laravel new application
  2. Install filament
  3. Use one of the blade heroicons in an blade view in your main apps resources
  4. Add php artisan optimize to your deployment script
  5. Deployment will fail stating unable to locate class or view component
@calebdw
Copy link
Contributor
calebdw commented May 18, 2025

I believe that package has a separate artisan icons:cache command, which is not included when running the optimize command

@CharrafiMed
Copy link
CharrafiMed commented May 18, 2025

we have like this error that only happens in production

The issue involves laravel-exceptions-renderer::icons.sun which is a built-in Laravel core icon used for error pages.
https://github.com/laravel/framework/blob/12.x/src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/sun.blade.php

Image

@calebdw even after running icons:cache before executing view:cache, the issue persists.

@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

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

No branches or pull requests

4 participants
0