asantibanez / livewire-charts

Neat Livewire Charts for your Laravel projects
MIT License
788 stars 116 forks source link

livewireChartsColumnChart is not defined #75

Closed spham closed 2 years ago

spham commented 2 years ago

Not display chart

To Reproduce Steps to reproduce the behavior:

  1. follow this README.md usage
  2. add @livewireChartsScripts in layout/app.blade.php
  3. php artisan livewire:publish --assets
  4. display source and see 404 can't reach generated public/vendor/livewire-charts/app.js
  5. but in this directory, not have app.js, just 3 files livrewire.js, livrewire.js.map and manifest.json )

Expected behavior Should see graphic

app.js:434 Uncaught ReferenceError: livewireChartsColumnChart is not defined
    at eval (eval at safeAsyncFunction (app.js:485:14), <anonymous>:3:16)
    at app.js:503:21
    at tryCatch (app.js:423:12)
    at evaluate (app.js:448:32)
    at app.js:2599:15
    at Function.<anonymous> (app.js:1166:55)
    at flushHandlers (app.js:560:46)
    at stopDeferring (app.js:565:5)
    at deferHandlingDirectives (app.js:568:3)
    at initTree (app.js:778:3)
app.js:434 Uncaught ReferenceError: init is not defined
    at eval (eval at safeAsyncFunction (app.js:485:14), <anonymous>:3:16)
    at app.js:503:21
    at tryCatch (app.js:423:12)
    at Function.evaluate (app.js:448:32)
    at app.js:2515:35
    at Function.<anonymous> (app.js:1166:55)
    at flushHandlers (app.js:560:46)
    at stopDeferring (app.js:565:5)
    at deferHandlingDirectives (app.js:568:3)
    at initTree (app.js:778:3)

Screenshots image

Additional context

resource\app.js

require('./bootstrap');
import Alpine from 'alpinejs';
import ApexCharts from 'apexcharts'
window.Alpine = Alpine;
Alpine.start();
Piket564 commented 2 years ago

How did you resolved?

coolsam726 commented 2 years ago

How was this resolved? I am getting the error after upgrading to ^2.4

MikePageDev commented 1 year ago

I am getting the same error. How was it fixed?

dominik-eller commented 5 months ago

I am having the same after upgrading to laravel-vite 1.0.1 and Vite 5

Edit: I got it solved by running: php artisan view:clear