Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions next.config.mjs → next.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
import type { NextConfig } from "next"

const nextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
Expand Down
13 changes: 13 additions & 0 deletions scripts/check-dirs.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { readdirSync, existsSync, statSync } from 'fs';
import { resolve } from 'path';

const cwd = process.cwd();
console.log("[v0] Current working directory:", cwd);
console.log("[v0] app dir exists:", existsSync(resolve(cwd, 'app')));
console.log("[v0] app is directory:", existsSync(resolve(cwd, 'app')) && statSync(resolve(cwd, 'app')).isDirectory());

if (existsSync(resolve(cwd, 'app'))) {
console.log("[v0] app dir contents:", readdirSync(resolve(cwd, 'app')));
}

Comment on lines +5 to +12
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statSync() can throw (e.g., permission issues or a race where the path disappears between existsSync and statSync). Consider storing the resolved path once and wrapping the statSync call in a try/catch (or use a single try { ... } block) so this diagnostic script doesn’t fail unexpectedly.

Suggested change
console.log("[v0] Current working directory:", cwd);
console.log("[v0] app dir exists:", existsSync(resolve(cwd, 'app')));
console.log("[v0] app is directory:", existsSync(resolve(cwd, 'app')) && statSync(resolve(cwd, 'app')).isDirectory());
if (existsSync(resolve(cwd, 'app'))) {
console.log("[v0] app dir contents:", readdirSync(resolve(cwd, 'app')));
}
const appDir = resolve(cwd, 'app');
const appDirExists = existsSync(appDir);
console.log("[v0] Current working directory:", cwd);
console.log("[v0] app dir exists:", appDirExists);
let appIsDirectory = false;
if (appDirExists) {
try {
appIsDirectory = statSync(appDir).isDirectory();
} catch (err) {
console.error("[v0] Error checking if app is directory:", err);
}
}
console.log("[v0] app is directory:", appIsDirectory);
if (appDirExists) {
console.log("[v0] app dir contents:", readdirSync(appDir));
}

Copilot uses AI. Check for mistakes.
console.log("[v0] Root dir contents:", readdirSync(cwd).filter(f => !f.startsWith('.')));
Comment on lines +9 to +13
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readdirSync() can throw (missing permissions, transient filesystem issues). Since this appears to be a diagnostics script, it would be more robust to catch and log errors instead of crashing, especially if it’s ever run in CI.

Copilot uses AI. Check for mistakes.
Loading