Skip to content

fix: resolve dev server startup failures (route name conflict + eslint abort) - #22

Open
Shevon37 wants to merge 1 commit into
acmenlei:masterfrom
Shevon37:fix/dev-server-startup-bugs
Open

fix: resolve dev server startup failures (route name conflict + eslint abort)#22
Shevon37 wants to merge 1 commit into
acmenlei:masterfrom
Shevon37:fix/dev-server-startup-bugs

Conversation

@Shevon37

@Shevon37 Shevon37 commented Aug 8, 2026

Copy link
Copy Markdown

Summary

Two independent bugs currently prevent yarn dev from starting on a fresh clone. Both are reproduced consistently and fixed here.

Bug 1 — Vue Router name conflict (white screen)

src/router/modules/{editor,home,template}.ts declared a child route with the same name as its parent. Vue Router 4 forbids nested routes sharing a name with an ancestor, so createRouter throws at startup and the whole app fails to mount (white screen).

Renamed the child routes to <parent>Index (e.g. editoreditorIndex), matching the convention already used by the syntax/update modules (syntaxHelper, updateLine).

  • src/router/modules/editor.ts: child editoreditorIndex
  • src/router/modules/home.ts: child homehomeIndex
  • src/router/modules/template.ts: child templatetemplateIndex

Bug 2 — eslint aborts the dev server on first run

vite-plugin-eslint runs with lintOnStart: true, but the auto-generated declaration files auto-imports.d.ts / components.d.ts were not covered by .eslintignore. The prettier formatting error inside the generated file aborts Vite's buildStart and kills the server before it ever starts.

Added auto-imports.d.ts, components.d.ts, and .eslintrc.cjs to both .eslintignore and .prettierignore. (.gitignore already ignores these generated files, so this is the correct scope.)

Test plan

  • yarn dev now reaches VITE ready without a route-name error
  • yarn dev no longer aborts due to the generated auto-imports.d.ts prettier error
  • Route name uniqueness checked across all src/router/modules/* (no duplicates, no parent/child name collisions)

Fixes # (many first-time users hit this on clone)

…t abort)

Two bugs block 'yarn dev' on a fresh clone:

1) Vue Router name conflict (white screen)
   src/router/modules/{editor,home,template}.ts declared a child route with the
   same 'name' as its parent, which Vue Router 4 forbids. Renamed child routes to
   '<parent>Index' (e.g. editor -> editorIndex), matching the convention already
   used by the syntax/update modules.

2) eslint aborts the dev server on first run
   vite-plugin-eslint runs with lintOnStart: true, but the auto-generated
   declaration files auto-imports.d.ts / components.d.ts were not ignored by eslint,
   so the prettier formatting error inside the generated file aborted vite's
   buildStart and killed the server. Added them (and .eslintrc.cjs) to
   .eslintignore and .prettierignore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant