Dhruva
Dhruva
FFilament
Created by Dhruva on 2/2/2024 in #❓┊help
npm run build is failing on github actions
I am encountering an issue with the npm run build command in github actions.
> build
> tsc && vite build && vite build --ssr

vite v4.5.1 building for production...
transforming...
Unable to resolve `@import "../../../../vendor/filament/filament/resources/css/theme.css"` from /home/runner/work/pinnacle/pinnacle/resources/css/filament/hq
✓ 4 modules transformed.
✓ built in 1.34s
[vite:css] [postcss] ENOENT: no such file or directory, open '../../../../vendor/filament/filament/resources/css/theme.css'
file: /home/runner/work/pinnacle/pinnacle/resources/css/filament/hq/theme.css:undefined:undefined
error during build:
Error: [postcss] ENOENT: no such file or directory, open '../../../../vendor/filament/filament/resources/css/theme.css'
Error: Process completed with exit code 1.
> build
> tsc && vite build && vite build --ssr

vite v4.5.1 building for production...
transforming...
Unable to resolve `@import "../../../../vendor/filament/filament/resources/css/theme.css"` from /home/runner/work/pinnacle/pinnacle/resources/css/filament/hq
✓ 4 modules transformed.
✓ built in 1.34s
[vite:css] [postcss] ENOENT: no such file or directory, open '../../../../vendor/filament/filament/resources/css/theme.css'
file: /home/runner/work/pinnacle/pinnacle/resources/css/filament/hq/theme.css:undefined:undefined
error during build:
Error: [postcss] ENOENT: no such file or directory, open '../../../../vendor/filament/filament/resources/css/theme.css'
Error: Process completed with exit code 1.
Below is my github action script
npm-build:
needs: build-and-test
name: 'Build NPM Assets'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build Assets
run: npm run build
- name: Pull changes
run: git pull
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: 'staging'
commit_message: >
chore: build npm assets
npm-build:
needs: build-and-test
name: 'Build NPM Assets'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build Assets
run: npm run build
- name: Pull changes
run: git pull
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: 'staging'
commit_message: >
chore: build npm assets
and my package.json
"scripts": {
"dev": "vite",
"build": "tsc && vite build && vite build --ssr",
"lint": "eslint . --ext js,jsx,ts,tsx",
"test": "vitest"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build && vite build --ssr",
"lint": "eslint . --ext js,jsx,ts,tsx",
"test": "vitest"
},
7 replies
FFilament
Created by Dhruva on 1/21/2024 in #❓┊help
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
I am getting folloiwng error when I am trying to add getRecordSubNavigation method in the resource
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewRecord::route('/{record}'),
Pages\EditRecord::route('/{record}/edit'),
]);
}
protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewRecord::route('/{record}'),
Pages\EditRecord::route('/{record}/edit'),
]);
}
6 replies
FFilament
Created by Dhruva on 8/24/2023 in #❓┊help
Notify for validation errors
How can I notify using Filament notifications, on submit, if form has validation errors. My form is long, sometimes, it's difficult to find which field has validation errors.
2 replies
FFilament
Created by Dhruva on 8/5/2023 in #❓┊help
Test Error - Call to a member function getId() on null
7 replies
FFilament
Created by Dhruva on 8/4/2023 in #❓┊help
Stats widget chart is not refreshing.
Stats overview widget count is refreshing/updating on filters, but the chart inside the stats widget is not. The chart is showing only mounted data.
protected function getStats(): array
{
return [
Stat::make('Subscribers', $this->count)
->chart($this->data)
->color('success'),
];
}
protected function getStats(): array
{
return [
Stat::make('Subscribers', $this->count)
->chart($this->data)
->color('success'),
];
}
Please help.
2 replies
FFilament
Created by Dhruva on 8/2/2023 in #❓┊help
How can I set different width for create and edit page than list pages in resource
My form consists of only two fields, and the width of the create/edit resource page is quite large. How can I configure a smaller width and center the form on the edit and create resource pages?
5 replies
FFilament
Created by Dhruva on 8/1/2023 in #❓┊help
Unable to locate file in Vite manifest: resources/css/filament/admin/theme.css on Production
I am facing vite manifest error on production while deploying using forge.
25 replies
FFilament
Created by Dhruva on 7/29/2023 in #❓┊help
CSS issues
3 replies
FFilament
Created by Dhruva on 6/2/2023 in #❓┊help
Pivot Column Reorder
Hi everyone, I'm working with two tables, "Locations" and "Waypoints," that are connected through a pivot table called "location_waypoint." The pivot table includes an additional column called "sort_order." I'm looking for guidance on how to display and reorder the 'sort_order' pivot column within the "Locations" table. (1) Retrieve the 'sort_order' column from the "location_waypoint" pivot table and show it into the "Locations" table. (2) Reorder the 'sort_order' column and after reordering it should persist in pivot table. Any assistance or suggestions on achieving this would be greatly appreciated. Thank you in advance for your help!
8 replies
FFilament
Created by Dhruva on 4/6/2023 in #❓┊help
Is there any way to hide modal's submit button ?
5 replies