#Why do I get Unable to locate file in Vite manifest: resources/css/filament/manage/theme.css ?

55 messages · Page 1 of 1 (latest)

obtuse gale
#

I get an error Unable to locate file in Vite manifest: resources/css/filament/manage/theme.css.

Even though my file path is correct.

vite.config.js

import {defineConfig} from 'vite';
import laravel from 'laravel-vite-plugin';
import path from 'path';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/sass/tinymce/tinymce.scss',
                'resources/sass/admin/admin.scss',
                'resources/sass/app.scss',
                'resources/js/admin.js',
                'resources/js/app.js',
                'resources/css/filament/admin/theme.css'
            ],
            refresh: true,
        }),
    ],
    resolve: {
        alias: {
            // '~fontawesome': path.resolve(__dirname, 'node_modules/@fortawesome/fontawesome-free'),
            '~fontawesome': path.resolve(__dirname, 'resources/sass/fontawesome'),
        },
    }
});
real sageBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

obtuse gale
#

This is what my PanelProvider looks like

->viteTheme('resources/css/filament/manage/theme.css'); at the end of the code

#

Is that because I use scss files instead of css?

dire heart
#

Your vite config is looking for ‘resources/css/filament/admin/theme.css’ not ‘resources/css/filament/manage/theme.css’

#

Just need to get all your paths in check.

obtuse gale
#

Oh no!

#

Thanks for the fix, this is how it looks after doing that.

#

What happened???

#

IT should look like better than this 😦

dire heart
#

What’s off about the second screen shot.

obtuse gale
#

For the 2nd screenshot. The new tailwind classes should be called here because I added tailwind classes

dire heart
#

Make sure the files that have those classes are included in the tailwind config

#

Could be wrong, but looks to me like you’re using the tw prose class which has a max width, so it also needs a max-w-none class on the prose element.

#

If thats what you’re talking about.

obtuse gale
#

Acutally no, ill display a better sample

#

This text should become red, but its still gray

dire heart
#

Where are you adding the red class?

#

Do you have a custom color in your tailwind config for “text-red” because that’s not a default class in tailwind. Try “text-red-500”

obtuse gale
#

changed it to that and rerun npm run dev, and (npm run build causes error)

dire heart
#

And what is the error?

obtuse gale
#

Is it because this was removed? ->viteTheme('resources/css/filament/manage/theme.css');

dire heart
#

Well, you still need that.

obtuse gale
#

Yeah, removed it because it breaks whenever I add that line of code

#

Output looks like this

dire heart
#

The default filament theme doesn’t have those classes. That’s the whole point of a custom theme. It builds against your code base and replaces the default filament theme.

obtuse gale
#

Yes understood

dire heart
#

That’s just how tw works.

obtuse gale
#

so i need to install tailwind ?

#

after doing the custom theme command for filament

dire heart
#

Its already installed.

obtuse gale
#

ran npm dev

dire heart
#

Is this a repo you can share?

obtuse gale
#

unfortunately its a private repo, not allowed :/

#

The error is unique

#

Cant find any result from the search engine

dire heart
#

Well, it’s hard to help without seeing exactly what you are doing, but it seems like you just have some setup out of place, but hard to help without seeing the code as a whole.

obtuse gale
#

I understand, sorry I think I might just have to search from different forums but thanks for helping me

dire heart
#

I promise it all works if it’s setup correctly.

obtuse gale
#

Hey just wondering why is it causing postcss error?

#

I havent installed postcss

#

Nvm postcss is in the package, I just dont understand the error

dire heart
#

Understood, but thats where it’s difficult to help without seeing all the files involved.

obtuse gale
#

I directly edited at the vendor file

#

Is this code looking for an npm package tailwind?

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
@import 'tailwindcss/variants';

@import 'base.css';

index.css at vendor/filament/filament/resources/css/index.css

#

Is this the case?
Because I see no tailwind in my node_modules.

dire heart
#

Why are you modifying vendor files? Stop now.

obtuse gale
#

Finding out why its causing this error and fixing it

dire heart
#

You should never touch vendor files.