Skip to content

Commit 9956ebd

Browse files
caffeinumclaude
andcommitted
fix: resolve typescript build errors for docker deployment
- fix motion.div className prop issues by using style attribute - add react-icons to web dependencies - fix useRef type annotations for NodeJS.Timeout - update processToolContent return type signature all typescript errors resolved, docker build now succeeds 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2ab1133 commit 9956ebd

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@ RUN apk add --no-cache python3 py3-pip python3-dev build-base git
77
# set working directory
88
WORKDIR /app
99

10-
# copy package files
10+
# copy package files and scripts
1111
COPY package*.json ./
12+
COPY scripts ./scripts
1213
COPY apps/web/package*.json ./apps/web/
1314
COPY apps/api/requirements.txt ./apps/api/
1415

15-
# install node dependencies
16-
RUN npm ci --only=production
17-
18-
# install web dependencies
19-
WORKDIR /app/apps/web
20-
RUN npm ci --only=production
16+
# install node dependencies without running postinstall
17+
RUN npm ci --only=production --ignore-scripts
2118

2219
# build stage for next.js
2320
FROM base AS builder
2421
WORKDIR /app
2522
COPY . .
2623

24+
# install all dependencies for build
25+
RUN npm ci --ignore-scripts
26+
WORKDIR /app/apps/web
27+
RUN npm ci
28+
2729
# build next.js app
2830
WORKDIR /app/apps/web
2931
RUN npm run build

apps/web/app/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ export default function HomePage() {
984984
initial={{ opacity: 0, scale: 0.9 }}
985985
animate={{ opacity: 1, scale: 1 }}
986986
exit={{ opacity: 0, scale: 0.9 }}
987-
className="bg-white dark:bg-gray-900 rounded-lg p-6 max-w-md w-full mx-4 border border-gray-200 dark:border-gray-700"
988987
>
988+
<div className="bg-white dark:bg-gray-900 rounded-lg p-6 max-w-md w-full mx-4 border border-gray-200 dark:border-gray-700">
989989
<div className="flex items-center gap-3 mb-4">
990990
<div className="w-10 h-10 bg-red-100 dark:bg-red-900/20 rounded-full flex items-center justify-center">
991991
<svg className="w-5 h-5 text-red-600 dark:text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -1029,6 +1029,7 @@ export default function HomePage() {
10291029
)}
10301030
</button>
10311031
</div>
1032+
</div>
10321033
</motion.div>
10331034
</div>
10341035
)}

apps/web/components/ChatLog.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import ToolResultItem from './ToolResultItem';
99
// Tool Message Component - Enhanced with new design
1010
const ToolMessage = ({ content, metadata }: { content: unknown; metadata?: { tool_name?: string; summary?: string; description?: string; file_path?: string; [key: string]: unknown } }) => {
1111
// Process tool content to extract action and file path
12-
const processToolContent = (rawContent: unknown) => {
12+
const processToolContent = (rawContent: unknown): {
13+
action: 'Edited' | 'Created' | 'Read' | 'Deleted' | 'Generated' | 'Searched' | 'Executed';
14+
filePath: string;
15+
cleanContent: string | undefined;
16+
toolName: string;
17+
} => {
1318
let processedContent = '' as string;
1419
let action: 'Edited' | 'Created' | 'Read' | 'Deleted' | 'Generated' | 'Searched' | 'Executed' = 'Executed';
1520
let filePath = '';

apps/web/components/ToolResultItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const ToolResultItem: React.FC<ToolResultItemProps> = ({ action, filePath, conte
110110
animate={{ height: 'auto', opacity: 1 }}
111111
exit={{ height: 0, opacity: 0 }}
112112
transition={{ duration: 0.2 }}
113-
className="overflow-hidden"
113+
style={{ overflow: 'hidden' }}
114114
>
115115
<div className="mt-2 ml-6 p-3 bg-gray-50 dark:bg-gray-900 rounded-lg">
116116
<pre className="text-xs text-gray-700 dark:text-gray-300 font-mono whitespace-pre-wrap break-words">

apps/web/hooks/useUserRequests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function useUserRequests({ projectId }: UseUserRequestsOptions) {
1414
const [activeCount, setActiveCount] = useState(0);
1515
const [isTabVisible, setIsTabVisible] = useState(true); // 기본값 true로 설정
1616

17-
const intervalRef = useRef<NodeJS.Timeout>();
17+
const intervalRef = useRef<NodeJS.Timeout | null>(null);
1818
const previousActiveState = useRef(false);
1919

2020
// 탭 활성화 상태 추적
@@ -65,7 +65,7 @@ export function useUserRequests({ projectId }: UseUserRequestsOptions) {
6565
if (!isTabVisible) {
6666
if (intervalRef.current) {
6767
clearInterval(intervalRef.current);
68-
intervalRef.current = undefined;
68+
intervalRef.current = null;
6969
}
7070
return;
7171
}

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"open": "^10.2.0",
1919
"react": "18.2.0",
2020
"react-dom": "18.2.0",
21+
"react-icons": "^5.5.0",
2122
"react-markdown": "^10.1.0",
2223
"react-syntax-highlighter": "^15.5.0"
2324
},

0 commit comments

Comments
 (0)