Deploying to Ubuntu Server

Anyone ever had this issue on deploy? Everything seems to be set to this last step when running npm run build any advice? npm run build
build vite build
vite v4.4.9 building for production... ✓ 1 modules transformed. ✓ built in 279ms Could not resolve entry module "resources/css/filament.css". error during build: RollupError: Could not resolve entry module "resources/css/filament.css". at error (file:///var/www/projectx/node_modules/rollup/dist/es/shared/node-entry.js:2287:30) at ModuleLoader.loadEntryModule (file:///var/www/projectx/node_modules/rollup/dist/es/shared/node-entry.js:24855:20) at async Promise.all (index 2) EDIT: I noticed in vite.config.js there was this:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
//'resources/css/filament.css',
],
refresh: true,
}),
],
});
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
//'resources/css/filament.css',
],
refresh: true,
}),
],
});
and I commented out the filament.css line. This allows npm run build to work but now there is no css for any of the frontend pages. Any advice please?
2 Replies
wyChoong
wyChoong15mo ago
Is the file even there?
tallgeese
tallgeeseOP15mo ago
no it wasn't, but that was in the default vite file got it working by commenting it out. However, the view did need @vite('resources/css/app.css') so if someone else runs into that issue, they might find it helpful
Want results from more Discord servers?
Add your server