PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

Uncaught (in promise) TypeError: expression.trim is not a function

produkt

Feb 26th, 2025 10:07 AM

Uncaught (in promise) TypeError: expression.trim is not a function

I recently updated npm and composer and now when I try to login, I get the error above. Anyone else experiencing this? How do I fix this? The file generating the error is /vendor/livewire/livewire.js

bobbyiliev

Feb 26th, 2025 10:10 AM

Hey!

I'm not 100% sure, but this looks like it might be related to cached files after your recent updates. Try clearing everything and rebuilding your assets with these commands:

php artisan optimize:clear
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
npm run dev
produkt

Feb 26th, 2025 10:29 AM

It didn't work :(

produkt

Feb 26th, 2025 11:24 AM

I had to do this (https://livewire.laravel.com/docs/installation#publishing-livewires-frontend-assets)

php artisan livewire:publish --assets

Report
1
bobbyiliev

Feb 26th, 2025 11:17 PM

Nice! Happy to hear that you got it working!