mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-25 17:24:21 +01:00
- Add proper error handling for missing ~/.claude/projects directory - Fix TypeError when d.parentPath is undefined (Node.js compatibility) - Replace toSorted() with sort() for Node.js 18 compatibility - Handle readdir errors gracefully and return empty arrays These changes prevent the application from crashing with 'Internal Server Error' when the Claude projects directory doesn't exist or when using Node.js < 20.
14 lines
215 B
Bash
Executable File
14 lines
215 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
|
|
|
if [ -d "dist/.next" ]; then
|
|
rm -rf dist/.next
|
|
fi
|
|
|
|
npx next build
|
|
cp -r public .next/standalone/
|
|
cp -r .next/static .next/standalone/.next/
|
|
|
|
cp -r .next/standalone ./dist/
|