Add linting issues (oxlint) FAQ section covering disable syntax, upgrade breakage, type-aware mode failures, and duplicate errors. Replace hardcoded Node version (v24) with .nvmrc references across TROUBLESHOOTING.md, CONTRIBUTING.md, and browser_tests/README.md to prevent stale docs. Generalize workspace filter examples to reference pnpm-workspace.yaml instead of hardcoding package names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.3 KiB
Troubleshooting Guide
This guide helps you resolve common issues when developing ComfyUI Frontend.
Quick Diagnostic Flowchart
flowchart TD
A[Having Issues?] --> B{What's the problem?}
B -->|Dev server stuck| C[nx serve hangs]
B -->|Build errors| D[Check build issues]
B -->|Lint errors| Q[Check linting issues]
B -->|Dependency issues| E[Package problems]
B -->|Other| F[See FAQ below]
Q --> R{oxlint or ESLint?}
R -->|oxlint| S[Check .oxlintrc.json<br/>and run pnpm lint:fix]
R -->|ESLint| T[Check eslint.config.ts<br/>and run pnpm lint:fix]
S --> L
T --> L
C --> G{Tried quick fixes?}
G -->|No| H[Run: pnpm i]
G -->|Still stuck| I[Run: pnpm clean]
I --> J{Still stuck?}
J -->|Yes| K[Nuclear option:<br/>pnpm dlx rimraf node_modules<br/>&& pnpm i]
J -->|No| L[Fixed!]
H --> L
D --> M[Run: pnpm build]
M --> N{Build succeeds?}
N -->|No| O[Check error messages<br/>in FAQ]
N -->|Yes| L
E --> H
F --> P[Search FAQ or<br/>ask in Discord]
Frequently Asked Questions
Development Server Issues
Q: pnpm dev or nx serve gets stuck and won't start
Symptoms:
- Command hangs on "nx serve"
- Dev server doesn't respond
- Terminal appears frozen
Solutions (try in order):
-
First attempt - Reinstall dependencies:
pnpm i -
Second attempt - Clean build cache:
pnpm clean -
Last resort - Full node_modules reset:
pnpm dlx rimraf node_modules && pnpm i
Why this happens:
- Corrupted dependency cache
- Outdated lock files after branch switching
- Incomplete previous installations
- NX cache corruption
Q: Port conflicts - "Address already in use"
Symptoms:
- Error:
EADDRINUSEor "port already in use" - Dev server fails to start
Solutions:
-
Find and kill the process using the port:
# On Linux/Mac lsof -ti:5173 | xargs kill -9 # On Windows netstat -ano | findstr :5173 taskkill /PID <PID> /F -
Use a different port by adding a
portoption to theserverblock invite.config.mts:server: { port: 3000, // ...existing config }
Build and Type Issues
Q: TypeScript errors after pulling latest changes
Symptoms:
- Type errors in files you didn't modify
- "Cannot find module" errors
Solutions:
-
Rebuild TypeScript references:
pnpm build -
Clean and reinstall:
pnpm clean && pnpm i -
Restart your IDE's TypeScript server
- VS Code:
Cmd/Ctrl + Shift + P→ "TypeScript: Restart TS Server"
- VS Code:
Q: "Workspace not found" or monorepo errors
Symptoms:
- pnpm can't find workspace packages
- Import errors between packages
Solutions:
-
Verify you're in the project root:
pwd # Should be in ComfyUI_frontend/ -
Rebuild workspace:
pnpm install pnpm build
Linting Issues (oxlint)
Q: eslint-disable comment isn't suppressing an oxlint rule
Symptoms:
// eslint-disable-next-line rule-namehas no effect- Lint error persists despite the disable comment
Solution:
oxlint has its own disable syntax. Use oxlint-disable instead:
// oxlint-disable-next-line no-console
console.log('debug')
Check whether the rule is enforced by oxlint (in .oxlintrc.json) or ESLint (in eslint.config.ts) to pick the right disable comment.
Q: New lint errors after pulling/upgrading oxlint
Symptoms:
- Lint errors in files you didn't change
- Rules you haven't seen before (e.g.
no-immediate-mutation,prefer-optional-chain)
Solutions:
-
Run the auto-fixer first:
pnpm lint:fix -
Review changes carefully — some oxlint auto-fixes can produce incorrect code. Check the diff before committing.
-
If a rule seems wrong, check
.oxlintrc.jsonto see if it should be disabled or configured differently.
Why this happens: oxlint version bumps often enable new rules by default.
Q: oxlint fails with TypeScript errors
Symptoms:
pnpm oxlintorpnpm lintfails with type-related errors- Errors mention type resolution or missing type information
Solution:
oxlint runs with --type-aware in this project, which requires valid TypeScript compilation. Fix the TS errors first:
pnpm typecheck # Identify TS errors
pnpm build # Or do a full build
pnpm lint # Then re-run lint
Q: Duplicate lint errors from both oxlint and ESLint
Symptoms:
- Same violation reported twice
- Conflicting auto-fix suggestions
Solution:
The project uses eslint-plugin-oxlint to automatically disable ESLint rules that oxlint already covers (see eslint.config.ts). If you see duplicates:
- Ensure
.oxlintrc.jsonis up to date after adding new oxlint rules - Run
pnpm lint(which runs oxlint then ESLint in sequence) rather than running them individually
Dependency and Package Issues
Q: "Package not found" after adding a dependency
Symptoms:
- Module not found after
pnpm add - Import errors for newly installed packages
Solutions:
-
Ensure you installed in the correct workspace (see
pnpm-workspace.yamlfor available workspaces):# Example: install in a specific workspace pnpm --filter <workspace-name> add <package> -
Clear pnpm cache:
pnpm store prune pnpm install
Q: Lock file conflicts after merge/rebase
Symptoms:
- Git conflicts in
pnpm-lock.yaml - Dependency resolution errors
Solutions:
-
Regenerate lock file:
rm pnpm-lock.yaml pnpm install -
Or accept upstream lock file:
git checkout --theirs pnpm-lock.yaml pnpm install
Testing Issues
Q: Tests fail locally but pass in CI
Symptoms:
- Flaky tests
- Different results between local and CI
Solutions:
-
Run tests in CI mode:
CI=true pnpm test:unit -
Clear test cache:
pnpm test:unit --no-cache -
Check Node version matches CI (see
.nvmrcfor the required version):node --version nvm use # If using nvm — reads .nvmrc automatically
Git and Branch Issues
Q: Changes from another branch appearing in my branch
Symptoms:
- Uncommitted changes not related to your work
- Dirty working directory
Solutions:
-
Stash and reinstall:
git stash pnpm install -
Check for untracked files:
git status git clean -fd # Careful: removes untracked files!
Still Having Issues?
- Search existing issues: GitHub Issues
- Ask the community: Discord (navigate to the
#dev-frontendchannel) - Create a new issue: Include:
- Your OS and Node version (
node --version) - Steps to reproduce
- Full error message
- What you've already tried
- Your OS and Node version (
Contributing to This Guide
Found a solution to a common problem? Please:
- Open a PR to add it to this guide
- Follow the FAQ format above
- Include the symptoms, solutions, and why it happens
Last Updated: 2026-03-10