46 Replies
have you run npm run build?
php artisan filament:upgrade?
yes i have
So what is the problem exactly
looks like an overflow issue with the image
the grid view in the table is not like it should be. and when adding media the images and styling is out of place
Has it always done that?
please provide the table code
yes
from the resource?
i have just installed it again, no result
You missed the instructions about adding the plugin’s styles and views. It’s the second step in the installation instruction.
i have to create a custom theme to do this
how stupid
Why's it stupid....
There's actually a very good reason for it. It's just the nature of how Tailwind works. https://filamentphp.com/docs/3.x/support/assets#using-tailwind-css-in-plugins
Unable to locate fi le in Vite manifest: resources/css/filament/admin/theme.css.
i am getting this error now
i am sorry
It doesn’t exist until you run
npm run build
It gives an error then for cropper.js
I have added the right path in app.css
Then you need to install cropper.js too
I did that too
I followed the instructions from curator
Step by step
Something’s off then. Hard to say what.
I will share what I did
@import '/vendor/filament/filament/resources/css/theme.css';
@import '/node-modules/cropperjs/dist/cropper.css';
@import '/vendor>awcodes/filament-curator/resources/css/plugin.css';
this i have added
error during build:
[vite:css] [postcss] ENOENT: no such file or directory, open 'C:\node-modules\cropperjs\dist\cropper.css'
error during build:
[vite:css] [postcss] ENOENT: no such file or directory, open 'C:\node-modules\cropperjs\dist\cropper.css'
file: C:\xampp\htdocs\nextxlfabricator\resources\css\filament\admin\theme.css:undefined:NaN
at async open (node:internal/fs/promises:639:25)
at async Object.readFile (node:internal/fs/promises:1242:14)
at async Object.load (file:///C:/xampp/htdocs/nextxlfabricator/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:36826:25)
at async loadImportContent (file:///C:/xampp/htdocs/nextxlfabricator/node_modules/vite/dist/node/chunks/dep-Bs_uPLzU.js:844:19)
at async Promise.all (index 0)
at async resolveImportId (file:///C:/xampp/htdocs/nextxlfabricator/node_modules/vite/dist/node/chunks/dep-Bs_uPLzU.js:800:27)
at async parseStyles$1 (file:///C:/xampp/htdocs/nextxlfabricator/node_modules/vite/dist/node/chunks/dep-Bs_uPLzU.js:708:5)
at async Object.Once (file:///C:/xampp/htdocs/nextxlfabricator/node_modules/vite/dist/node/chunks/dep-Bs_uPLzU.js:965:22)
at async LazyResult.runAsync (C:\xampp\htdocs\nextxlfabricator\node_modules\postcss\lib\lazy-result.js:261:11)
at async compileCSS (file:///C:/xampp/htdocs/nextxlfabricator/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:36889:21)
you're paths are off. they should be relative to the location of the stylesheet
at least that's what it looks like to me
this is what documentation says the path should refer to
i am following the documentation
the docs say '<path-to-node-modules>',
@import '/vendor/filament/filament/resources/css/theme.css';
@import '/node-modules/cropperjs/dist/cropper.css';
@import '/vendor>awcodes/filament-curator/resources/css/plugin.css';
you have to provide that yourself. the plugin / theme has no way of knowing exactly how your app is set up
what is the path of your filament theme css file?
this
'resources/css/filament/admin/theme.css',
in vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/css/filament/admin/theme.css',
'resources/js/app.js',
],
refresh: true,
}),
],
});
Ok, so you need to traverse up the directories with your import
what do you mean
../../../node_modules
no still not working
i have basic setup. i
i didn't change folders or anything
You have to get the number of ../ right
Don’t just copy paste
look
it is at the top
But your stylesheet and tailwind config aren’t. That’s why you have to be explicit
the error you shared says it's look for node modules at the root of your drive, not the root of the app
yes
in c
which paths are we talking about
in theme.css only?
this works in my app.
with the
filament:theme
artisan commandit doesnm't work here
you have anydesk?
did you install cropperjs globally?
or in the app
npm install -D cropperjs
this is not working
right but in the terminal were you actually in the app directory?
not working here
yes
in the app
C:\xampp\htdocs\nextxlfabricator>npm install -D cropperjs
owwww
i see
i haveto install it in c
no, you need to change the path in your import statement
but this is not working
have a meeting. back in a while
ok
this was fine and now it is working
@import '/vendor/filament/filament/resources/css/theme.css';
@import '/node_modules/cropperjs/dist/cropper.css';
@import '/vendor/awcodes/filament-curator/resources/css/plugin.css';
really strange