Have you just forgot to execute npm run build ?
Vite manifest not found
I recently got a new computer and although I believe vite worked for a while with the new set up, something has since broken, and I am not sure what might have broke. (i'm dealing with cancer so its been a while since i upgraded to know for sure) I'm wonderinf if perhaps there is a system configuration that I need to identify and fix as all the standard steps to fix have been done numerous times.
I am getting the error: Unable to locate file in Vite manifest: resources/css/app.css.
yet the files appear in my file structure.
Vite config :
import {defineConfig} from 'vite'
import laravel, {refreshPaths} from 'laravel-vite-plugin'
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [
...refreshPaths,
'app/Livewire/**',
],
}),
],
})
postcss.config.js
export default {
plugins: {
'tailwindcss/nesting': 'postcss-nesting',
'tailwindcss': {},
'autoprefixer': {},
},
};
tailwind.config.js
import defaultTheme from 'tailwindcss/defaultTheme';
import forms from '@tailwindcss/forms';
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
// './vendor/ralphjsmit/laravel-filament-record-finder/resources/**/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
"./resources/**/**/*.blade.php",
"./resources/**/**/*.js",
"./app/View/Components/**/**/*.php",
"./app/Livewire/**/**/*.php",
"./vendor/livewire/flux-pro/stubs/**/*.blade.php",
"./vendor/livewire/flux/stubs/**/*.blade.php",
// "./vendor/robsontenorio/mary/src/View/Components/**/*.php"
],
theme: {
extend: {
colors: {
// Add other color groups similarly
primary: 'var(--primary)',
secondary: 'var(--secondary)',
success: 'var(--success)',
accent: 'var(--accent)',
dark: 'var(--dark)',
light: 'var(--light)',
warning: 'var(--warning)',
danger: 'var(--danger)',
inactive: 'var(--inactive)',
info: 'var(--info)',
text: 'var(--text-color)',
},
textColor: {
DEFAULT: 'var(--text-color)',
},
fontFamily: {
sans: ['Figtree', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [forms,
require("@tailwindcss/typography"),
require("daisyui")
],
daisyui: {
themes: [{
hpLight: {
"primary": "#2563eb",
"secondary": "#00bb00",
"accent": "#eab308",
"neutral": "#161616",
"base-100": "#20485d",
"info": "#00dfff",
"success": "#a1c100",
"warning": "#de7800",
"error": "#ff6768",
"--rounded-box": "2rem", // border radius rounded-box utility class, used in card and other large boxes
"--rounded-btn": "2rem", // border radius rounded-btn utility class, used in buttons and similar element
"--rounded-badge": "2rem", // border radius rounded-badge utility class, used in badges and similar
"--tab-radius": "2rem", // border radius of tabs
},
hpDark: {
"primary": "hsl(138,67%,61%)",
"secondary": "hsl(169, 77%, 80%)",
"accent": "hsl(45, 100%, 51%)",
"neutral": "hsl(245,5%,58%)",
"base-100": "hsl(201,89%,14%)",
"base-200": "hsl(203,87%,24%)",
"base-300": "hsl(201,89%,34%)",
"info": "hsl(200, 100%, 50%)",
"success": "#a1c100",
"warning": "hsl(23, 69%, 58%)",
"error": "hsl(0, 100%, 50%)",
"--rounded-box": "1.5rem", // border radius rounded-box utility class, used in card and other large boxes
"--rounded-btn": "1.25rem", // border radius rounded-btn utility class, used in buttons and similar element
"--rounded-badge": "2rem", // border radius rounded-badge utility class, used in badges and similar
"--tab-radius": "2rem", // border radius of tabs
},
},
"winter", "night", "light", "dark"], // false: only light + dark | true: all themes | array: specific themes like this ["light", "dark", "cupcake"]
darkTheme: "hpDark", // name of one of the included themes for dark mode
base: true, // applies background color and foreground color for root element by default
styled: true, // include daisyUI colors and design decisions for all components
utils: true, // adds responsive and modifier utility classes
prefix: "", // prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors)
logs: true, // Shows info about daisyUI version and used config in the console when building your CSS
themeRoot: ":root", // The element that receives theme color CSS variables
},
};
resources/css/filament/admin/tailwin.config.js
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'
export default {
presets: [preset],
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./vendor/ralphjsmit/laravel-filament-media-library/resources/**/*.blade.php'
],
}
package.json
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.12",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.13",
"laravel-vite-plugin": "^1.0.2",
"postcss": "^8.5.3",
"postcss-nesting": "^13.0.1",
"tailwindcss": "^3.4.17",
"vite": "^6.1.0"
},
"dependencies": {
"latest-version": "^9.0.0",
"text-diff": "^1.0.1"
}
}
I had tried tailwind 4.0 as well but filament doesnt seem to be compatible yet.
Using laravel 11.43.1
response from npm run build:
vite v6.1.0 building for production...
transforming (1) resources\js\app.js
🌼 daisyUI 4.12.23
├─ ✔︎ 6 themes added https://daisyui.com/docs/themes
╰─ ★ Star daisyUI on GitHub https://github.com/saadeghi/daisyui
✓ 2 modules transformed.
Generated an empty chunk: "app".
public/build/manifest.json 0.27 kB │ gzip: 0.15 kB
public/build/assets/app-BPKqs7eD.css 263.41 kB │ gzip: 40.93 kB
public/build/assets/app-l0sNRNKZ.js 0.00 kB │ gzip: 0.02 kB
✓ built in 3.45s
manifest.json
{
"resources/css/app.css": {
"file": "assets/app-BPKqs7eD.css",
"src": "resources/css/app.css",
"isEntry": true
},
"resources/js/app.js": {
"file": "assets/app-l0sNRNKZ.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true
}
}
I think that is everything connected to this system, so im not sure what else to do at this point, but i cant do anything with my app as long as this error persists
Please or to participate in this conversation.