Error “Unable to find component: [landing.slider]” in subfolder | Livewire

I’m encountering an issue in my Laravel project where the Livewire components work perfectly in my local development environment, but when I deploy the project to production, I receive the following error:

error screenshot

Unable to find component: [landing.slider]

For landing.slider component, but header and footer components work without any issues!
This issue does not occur in the local development environment, only in production on server.

Here’s the setup of my landing.blade.php file:

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
       ...
    </head>
    <body>
    <main class="site-main">
         <livewire:header />
        <livewire:landing.slider /> <!-- This component works fine -->
        <livewire:landing.menu /> <!-- Error: Unable to find component -->
        <livewire:landing.order-details /> <!-- Error: Unable to find component -->
        <livewire:landing.reviews />
        <livewire:landing.delivery-zone />
        <livewire:landing.features />
        <livewire:landing.banner />
        <livewire:landing.faq />
        <livewire:footer /> <!-- This component works fine -->
        <livewire:popup-wrapper />
    </main>
    </body>
</html>

The project is structured as follows:

app/
│   ├── Livewire/
│   │   ├── Header.php <!-- This component works fine -->
│   │   ├── Footer.php <!-- This component works fine -->
│   │   ├── landing/
│   │   │   ├── Slider.php <!-- Error: Unable to find component -->
│   │   │   ├── Menu.php <!-- this and all subsequent components inside landing were not found ->
│   │   │   ├── OrderDetails.php
│   │   │   ├── Reviews.php
│   │   │   ├── DeliveryZone.php
│   │   │   ├── Features.php
│   │   │   ├── Banner.php
│   │   │   ├── Faq.php

Here are detailed screenshots of my structure:

  • Resources folder https://d.pr/i/iSlKcH
  • App folder https://d.pr/i/w953GB

Question:

What could be causing this issue in the production environment, and how can I resolve it so that the Livewire components nested in subdirectories are properly recognized?

What I’ve Tried:

  1. Correct Structure and Naming Conventions:

I verified that my Livewire components are correctly named and placed within the appropriate directories. For example, the Slider component is located at app/Livewire/landing/Slider.php, and the namespace is AppLivewirelanding.

  1. Correct Usage in Blade:

I’m using the correct syntax for components that are nested within folders, such as:

<livewire:landing.slider />

  1. Clearing Cache:

I ran the following commands to clear various caches, hoping to resolve the issue:

php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear
php artisan config:cache

New contributor

twinkle is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật