saade / filament-fullcalendar

The Most Popular JavaScript Calendar as a Filament Widget
MIT License
282 stars 85 forks source link

Failed to find '@fullcalendar/common/main.css' #96

Closed it-dubbelglas closed 1 year ago

it-dubbelglas commented 1 year ago

Hi,

By upgrading from v1.8.0 to v1.9.0 my project (npm) broke.

I get the following error message, when executing the npm run dev command

ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Failed to find '@fullcalendar/common/main.css'

I'm making use of the customization feature described in your documentation's Styling-chapter, having the following line in my ./resources/css/app.css:

@import '../../vendor/saade/filament-fullcalendar/resources/css/filament-fullcalendar.css';

My webpack.mix.js looks like this:

mix.js('resources/js/app.js', 'public/js')
    .postCss('resources/css/app.css', 'public/css', [
        require('tailwindcss'),
    ])

I think the change you made to resources/css/filament-fullcalendar.css in your last commit, broke the building process.

Am I doing something wrong? How to fix this?

kamilst96 commented 1 year ago

First issue is that filament-fullcalendar.css assumes there will be node_modules populated within package root, but it isn't there.

"@fullcalendar/core": "^5.11.5",
"@fullcalendar/daygrid": "^5.11.5",
"@fullcalendar/interaction": "^5.11.5",
"@fullcalendar/list": "^5.11.5",
"@fullcalendar/moment": "^5.11.5",
"@fullcalendar/moment-timezone": "^5.11.5",
"@fullcalendar/resource-timeline": "^5.11.3",
"@fullcalendar/rrule": "^5.11.5",
"@fullcalendar/timegrid": "^5.11.5",

But it still bugs out beyond my level of competence.

image

I suggest freezing package at 1.8.0 and wait. I'll be probing around, but saade will probably fix it soon.

sergioraldana commented 1 year ago

Similar here:

Captura de pantalla 2023-07-10 a la(s) 17 59 32
it-dubbelglas commented 1 year ago

v1.9.1 with commit 5c9276044665bbcbb1fd944bdbb8ea42a152eb43 fixed the issue. Thanks @saade !

bobwurtz commented 1 year ago

I still experience this issue with v1.9.1 and v1.9.2. Downgrading to v1.8.0 fixed this for me. Can this be reopened?

kamilst96 commented 1 year ago

@bobwurtz did you include the newly required config?

 'plugins' => [
        'dayGrid' => true,
        'timeGrid' => true,
        'interaction' => true,
        'list' => true,
        'rrule' => true,
        'resourceTimeline' => true,
    ],
bobwurtz commented 1 year ago

@kamilst96 I did not. My mistake - I should have read the updated docs more carefully.