Skip to content

Commit 13fd386

Browse files
authored
fix: use setup-vp in deploy workflow (#136)
The deploy workflow used `setup-node-pnpm` which doesn't provide the `vite`/`vp` binary, causing `vite: not found` on the `pnpm build` step after #135. Fix: switch to `setup-vp` (matching ci.yml) and use `vp run @vibe/dashboard#build` directly. Fixes https://github.com/voidzero-dev/vibe-dashboard/actions/runs/22525169259/job/65256003700
1 parent 9aa798e commit 13fd386

5 files changed

Lines changed: 62 additions & 48 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626

27-
- name: Setup Node.js and pnpm
28-
uses: ./.github/actions/setup-node-pnpm
27+
- name: Setup vp
28+
uses: voidzero-dev/setup-vp@679fb3bf669a1777bb417e81218c5ab904aa037f # v1
29+
with:
30+
cache: true
2931

3032
- name: Build
31-
run: pnpm build
33+
run: vp run build
3234

3335
- name: Setup Pages
3436
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

AGENTS.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ A modern frontend dashboard for displaying different metrics using bar charts. B
88

99
### Prerequisites and Installation
1010

11-
- Install Node.js v20 or higher (verified working with v20.19.4)
12-
- Install pnpm globally: `npm install -g pnpm` (requires pnpm v10 or higher)
11+
- Install the global `vp` CLI (see https://staging.viteplus.dev/vite/guide/):
12+
13+
```bash
14+
# Linux / macOS
15+
curl -fsSL https://staging.viteplus.dev/install.sh | bash
16+
17+
# Windows
18+
irm https://staging.viteplus.dev/install.ps1 | iex
19+
```
20+
1321
- Bootstrap the repository:
1422

1523
```bash
16-
pnpm install
24+
vp install
1725
```
1826

1927
- **Timing**: Takes approximately 10 seconds. NEVER CANCEL. Set timeout to 60+ seconds.
@@ -23,7 +31,7 @@ A modern frontend dashboard for displaying different metrics using bar charts. B
2331
- Build the project:
2432

2533
```bash
26-
pnpm build
34+
vp run build
2735
```
2836

2937
- **Timing**: Takes approximately 7 seconds. NEVER CANCEL. Set timeout to 60+ seconds.
@@ -33,37 +41,28 @@ A modern frontend dashboard for displaying different metrics using bar charts. B
3341
- Start development server:
3442

3543
```bash
36-
pnpm dev
44+
vp run dev
3745
```
3846

3947
- Starts at `http://localhost:5173/`
4048
- **Timing**: Starts in under 1 second (192ms)
4149
- Uses Vite with hot module replacement (HMR)
4250

43-
- Lint the code:
44-
45-
```bash
46-
pnpm lint
47-
```
48-
49-
- **Timing**: Takes approximately 2 seconds
50-
- Runs ESLint across all packages
51-
- **ALWAYS run before committing** to avoid CI failures
52-
53-
- Format the code:
51+
- Check (lint + format):
5452

5553
```bash
56-
pnpm fmt
54+
vp run check
5755
```
5856

5957
- **Timing**: Takes approximately 2 seconds
60-
- Runs vite fmt across all files
58+
- Runs `vp check` (lint + format in one command)
6159
- **ALWAYS run before committing** to avoid CI failures
60+
- Use `vp run check:fix` to auto-fix issues
6261

6362
- Clean build artifacts:
6463

6564
```bash
66-
pnpm clean
65+
vp run clean
6766
```
6867

6968
- **Timing**: Takes under 1 second
@@ -72,7 +71,7 @@ A modern frontend dashboard for displaying different metrics using bar charts. B
7271
- Test command:
7372

7473
```bash
75-
pnpm test
74+
vp test
7675
```
7776

7877
- **Note**: Currently no tests are configured, command runs but executes nothing
@@ -109,7 +108,7 @@ vibe-dashboard/
109108
**ALWAYS test these scenarios after making changes:**
110109

111110
1. **Basic functionality**:
112-
- Run `pnpm dev` and navigate to `http://localhost:5173/`
111+
- Run `vp run dev` and navigate to `http://localhost:5173/`
113112
- Verify the dashboard loads with "Vibe Dashboard" header
114113
- Confirm Sales chart is displayed by default
115114

@@ -130,7 +129,7 @@ vibe-dashboard/
130129

131130
- **ALWAYS run before committing**:
132131
```bash
133-
pnpm lint && pnpm build
132+
vp run check && vp run build
134133
```
135134
- Verify build completes without errors
136135
- Check that no TypeScript compilation errors occur
@@ -170,20 +169,19 @@ vibe-dashboard/
170169

171170
```bash
172171
# Development workflow
173-
pnpm install # Install dependencies (~10s)
174-
pnpm dev # Start dev server (<1s startup)
175-
pnpm build # Production build (~7s)
176-
pnpm lint # Lint all packages (~2s)
177-
pnpm clean # Clean build artifacts (<1s)
172+
vp install # Install dependencies (~10s)
173+
vp run dev # Start dev server (<1s startup)
174+
vp run build # Production build (~7s)
175+
vp run check # Check (lint + format) (~2s)
176+
vp run clean # Clean build artifacts (<1s)
178177

179178
# Monorepo-specific
180-
pnpm --filter dashboard dev # Run dev only for dashboard
181-
pnpm -r build # Build all packages recursively
179+
vp run @vibe/dashboard#dev # Run dev only for dashboard
182180
```
183181

184182
### Troubleshooting
185183

186-
- **Build fails**: Check TypeScript errors, run `pnpm lint` first
184+
- **Build fails**: Check TypeScript errors, run `vp run check` first
187185
- **Dev server won't start**: Ensure port 5173 is available
188186
- **Charts not rendering**: Verify Recharts data format matches expected structure
189187
- **Styles broken**: Check CSS imports in `App.tsx` and `main.tsx`

CLAUDE.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@
22

33
React 19 + TypeScript + Vite 7 dashboard. pnpm monorepo.
44

5+
## Prerequisites
6+
7+
Install the global `vp` CLI first (see https://staging.viteplus.dev/vite/guide/):
8+
9+
```bash
10+
# Linux / macOS
11+
curl -fsSL https://staging.viteplus.dev/install.sh | bash
12+
13+
# Windows
14+
irm https://staging.viteplus.dev/install.ps1 | iex
15+
```
16+
517
## Commands
618

719
```bash
8-
pnpm install # Install deps (~10s, timeout 60s+)
9-
pnpm dev # Dev server at localhost:5173
10-
pnpm build # Production build (~7s)
11-
pnpm lint # Run ESLint
12-
pnpm fmt # Format with vite fmt
20+
vp install # Install deps (~10s, timeout 60s+)
21+
vp run dev # Dev server at localhost:5173
22+
vp run build # Production build (~7s)
23+
24+
# Check (lint + format)
25+
vp run check
26+
vp run check:fix
1327
```
1428

1529
## Structure
@@ -28,6 +42,6 @@ You run in an environment where `ast-grep` is available; whenever a search requi
2842

2943
## Always
3044

31-
- Run `pnpm lint && pnpm build` before commits
45+
- Run `vp run check && vp run build` before commits
3246
- Prefer editing existing files over creating new ones
3347
- Don't create docs unless explicitly requested

apps/dashboard/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"dev": "vite dev",
8-
"build": "vite build",
9-
"preview": "vite preview",
7+
"dev": "vp dev",
8+
"build": "vp build",
9+
"preview": "vp preview",
1010
"clean": "rm -rf dist",
11-
"test": "vite test"
11+
"test": "vp test"
1212
},
1313
"dependencies": {
1414
"@vibe/shared": "workspace:*",

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"description": "A frontend dashboard for displaying different metrics",
66
"type": "module",
77
"scripts": {
8-
"ready": "vite run check && vite run test && vite run build",
9-
"dev": "vite run @vibe/dashboard#dev",
10-
"build": "vite run @vibe/dashboard#build",
8+
"ready": "vp run check && vp run test && vp run build",
9+
"dev": "vp run @vibe/dashboard#dev",
10+
"build": "vp run @vibe/dashboard#build",
1111
"check": "vp check",
1212
"check:fix": "vp check --fix",
13-
"test": "vite test",
14-
"cache:clean": "vite cache clean",
13+
"test": "vp test",
14+
"cache:clean": "vp cache clean",
1515
"generate": "node tools/override-rolldown.mjs --stats",
1616
"prepare": "husky"
1717
},

0 commit comments

Comments
 (0)