fix: Resolve TypeScript build errors for production deployment
- Add type assertion for SurrealDB query results in debug/nodes route - Install @types/three for Three.js type definitions - Exclude tests directory from TypeScript compilation - Wrap useSearchParams in Suspense boundary on login page (Next.js 16 requirement) All routes now build successfully for production deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ export async function GET(request: NextRequest) {
|
||||
WHERE user_did = $userDid
|
||||
`;
|
||||
const results = await db.query(nodesQuery, { userDid });
|
||||
const nodes = results[0] || [];
|
||||
const nodes = (results[0] || []) as any[];
|
||||
|
||||
// Count stats
|
||||
const stats = {
|
||||
|
||||
@@ -10,10 +10,10 @@ import {
|
||||
Text,
|
||||
} from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { useState } from 'react';
|
||||
import { useState, Suspense } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
export default function LoginPage() {
|
||||
function LoginForm() {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const searchParams = useSearchParams();
|
||||
const error = searchParams.get('error');
|
||||
@@ -89,3 +89,17 @@ export default function LoginPage() {
|
||||
</Center>
|
||||
);
|
||||
}
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<Suspense fallback={
|
||||
<Center h="100vh">
|
||||
<Paper w={400} p="xl">
|
||||
<Title order={2} ta="center">Loading...</Title>
|
||||
</Paper>
|
||||
</Center>
|
||||
}>
|
||||
<LoginForm />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"@types/node": "latest",
|
||||
"@types/react": "latest",
|
||||
"@types/react-dom": "latest",
|
||||
"@types/three": "^0.181.0",
|
||||
"eslint": "latest",
|
||||
"eslint-config-next": "latest",
|
||||
"jiti": "^2.6.1",
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -99,6 +99,9 @@ importers:
|
||||
'@types/react-dom':
|
||||
specifier: latest
|
||||
version: 19.2.2(@types/react@19.2.2)
|
||||
'@types/three':
|
||||
specifier: ^0.181.0
|
||||
version: 0.181.0
|
||||
eslint:
|
||||
specifier: latest
|
||||
version: 9.39.1(jiti@2.6.1)
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
"node_modules",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user