flake.nix only rewrote @/ aliases but left extensionless relative imports (./router) in compiled dist/. node dist/index.js (how prod runs) cannot resolve extensionless ESM specifiers -> ERR_MODULE_NOT_FOUND -> backend crashlooped (444 restarts, port 4001 dead). Extract the fixer into a shared scripts/fix-imports.mjs that appends .js to extensionless relative imports and rewrites @/ aliases, and wire it into backend + discord-gateway build phases. Verified: fresh tsc + fixer -> node dist/index.js boots; oRPC over /trpc serves both HTTP POST and WebSocket (config/dashboard/voice/moderation/ media/chatbot/analysis) end-to-end against Postgres + Redis. next build passes with the oRPC client + partysocket.
38 lines
900 B
JSON
38 lines
900 B
JSON
{
|
|
"name": "frontend",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "biome check",
|
|
"format": "biome format --write"
|
|
},
|
|
"dependencies": {
|
|
"@orpc/client": "1.15.0",
|
|
"clsx": "^2.1.1",
|
|
"lucide-react": "^1.27.0",
|
|
"motion": "^12.0.0",
|
|
"next": "16.2.12",
|
|
"next-themes": "^0.4.6",
|
|
"partysocket": "1.3.0",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"swr": "^2.4.2",
|
|
"tailwind-merge": "^3.6.0",
|
|
"three": "^0.180.0"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "2.2.0",
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@types/three": "^0.180.0",
|
|
"babel-plugin-react-compiler": "1.0.0",
|
|
"puppeteer-core": "^25.7.0",
|
|
"tailwindcss": "^4",
|
|
"typescript": "^5"
|
|
}
|
|
} |