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
|
WHERE user_did = $userDid
|
||||||
`;
|
`;
|
||||||
const results = await db.query(nodesQuery, { userDid });
|
const results = await db.query(nodesQuery, { userDid });
|
||||||
const nodes = results[0] || [];
|
const nodes = (results[0] || []) as any[];
|
||||||
|
|
||||||
// Count stats
|
// Count stats
|
||||||
const stats = {
|
const stats = {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { useForm } from '@mantine/form';
|
import { useForm } from '@mantine/form';
|
||||||
import { useState } from 'react';
|
import { useState, Suspense } from 'react';
|
||||||
import { useSearchParams } from 'next/navigation';
|
import { useSearchParams } from 'next/navigation';
|
||||||
|
|
||||||
export default function LoginPage() {
|
function LoginForm() {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const error = searchParams.get('error');
|
const error = searchParams.get('error');
|
||||||
@@ -89,3 +89,17 @@ export default function LoginPage() {
|
|||||||
</Center>
|
</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/node": "latest",
|
||||||
"@types/react": "latest",
|
"@types/react": "latest",
|
||||||
"@types/react-dom": "latest",
|
"@types/react-dom": "latest",
|
||||||
|
"@types/three": "^0.181.0",
|
||||||
"eslint": "latest",
|
"eslint": "latest",
|
||||||
"eslint-config-next": "latest",
|
"eslint-config-next": "latest",
|
||||||
"jiti": "^2.6.1",
|
"jiti": "^2.6.1",
|
||||||
|
|||||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -99,6 +99,9 @@ importers:
|
|||||||
'@types/react-dom':
|
'@types/react-dom':
|
||||||
specifier: latest
|
specifier: latest
|
||||||
version: 19.2.2(@types/react@19.2.2)
|
version: 19.2.2(@types/react@19.2.2)
|
||||||
|
'@types/three':
|
||||||
|
specifier: ^0.181.0
|
||||||
|
version: 0.181.0
|
||||||
eslint:
|
eslint:
|
||||||
specifier: latest
|
specifier: latest
|
||||||
version: 9.39.1(jiti@2.6.1)
|
version: 9.39.1(jiti@2.6.1)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
".next/dev/types/**/*.ts"
|
".next/dev/types/**/*.ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules",
|
||||||
|
"tests"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user