Refactored useWebSocket.ts to prevent SSR-related connection issues: - Created ClientState interface to encapsulate all client-only state - Added getClientState() function with lazy initialization on client only - Added SSR guards (import.meta.client) to all connection functions - Reset reactive state on client hydration to ensure clean slate - Moved heartbeatInterval and stuckStateCheckInterval into ClientState - Changed NodeJS.Timeout to ReturnType<typeof setTimeout/setInterval> - Wrapped auth watcher in import.meta.client guard Root cause: Module-level singleton state was being initialized during SSR, then persisting in a potentially corrupted state during hydration. This caused intermittent "Socket exists: no" issues where the browser wouldn't even attempt WebSocket connections. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .claude | ||
| app | ||
| assets/css | ||
| components | ||
| composables | ||
| constants | ||
| coverage | ||
| layouts | ||
| middleware | ||
| pages | ||
| plugins | ||
| public | ||
| store | ||
| tests | ||
| types | ||
| .dockerignore | ||
| .gitignore | ||
| app.vue | ||
| bun.lock | ||
| CLAUDE.md | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| nuxt.config.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tailwind.config.js | ||
| TEST_STATUS.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Nuxt Minimal Starter
Look at the Nuxt documentation to learn more.
Setup
Make sure to install dependencies:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
Development Server
Start the development server on http://localhost:3000:
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
Production
Build the application for production:
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
Locally preview production build:
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
Check out the deployment documentation for more information.