Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AsnCode's avatar

Uncaught (in promise) Component not found: PpKxSUutyHuTXdXplAz5

Seriously that thing going to burn my head .... ^^ I try all solution and i ALWAYS have this error .... Uncaught (in promise) Component not found: XXXX.....

I have this loop:

<div class="col-span-full">
      <div class="grid grid-cols-12 gap-3">
            @foreach($this->capsules as $capsule)
                 <x-capsules.capsule-item :key="$capsule->id" :capsule="$capsule" />
            @endforeach
      </div>
</div>

Inside my x-capsule-item i have this item :

      <livewire:shared.like-button :key="$capsule->id" :capsule="$capsule" />

And THIS ITEM (shared.like-button) make Uncaught (in promise) Component not found ERROR ALWAYS!

My Like livewire component :

Seriously i isolate the problematic component

<livewire:shared.like-button wire:key="cap-like-{{  $capsule->id }}" :capsule="$capsule" />

BUT i dont know <here to fix this issus ....

thanks you

0 likes
2 replies
LaryAI's avatar
Level 58

The error message "Uncaught (in promise) Component not found" typically indicates that Livewire is unable to locate the specified component. Here are some steps to troubleshoot and resolve this issue:

  1. Component Registration: Ensure that your Livewire component is correctly registered. The class name should match the component name in your Blade file. For example, if your component is <livewire:shared.like-button>, the class should be LikeButton and located in the App\Http\Livewire\Shared namespace.

  2. Namespace and Directory Structure: Verify that your component is in the correct directory. If your component is named LikeButton, it should be located at app/Http/Livewire/Shared/LikeButton.php.

  3. Component Naming: Double-check the naming convention. Livewire components should follow the kebab-case naming convention in Blade files. Ensure that your component is named correctly in both the Blade file and the PHP class.

  4. Composer Autoload: Run composer dump-autoload to ensure that all classes are properly autoloaded. This can resolve issues where the class is not being recognized.

  5. Cache Issues: Clear any cached views and configurations that might be causing the issue. Run the following commands:

    php artisan view:clear
    php artisan config:clear
    php artisan cache:clear
    
  6. Check for Typos: Ensure there are no typos in the component name or path. Even a small typo can cause Livewire to not find the component.

  7. Livewire Version: Make sure you are using a compatible version of Livewire. If you recently updated Livewire, check the release notes for any breaking changes.

  8. Debugging: Add some debugging statements in your LikeButton component to ensure it's being instantiated correctly. You can use dd() or Log::info() to output messages.

If you've gone through these steps and the issue persists, consider creating a minimal reproducible example to isolate the problem further. This can help identify if the issue is with the component itself or with the surrounding code.

AsnCode's avatar

thats dont work i made all the AI thats demand me and allways have the error ... the error come from

   <livewire:shared.like-button wire:key="cap-like-{{  $capsule->id }}" :capsule="$capsule" />

but i'm lost ....

Please or to participate in this conversation.