Skip to content

nui-svelte fails npm install: vite-plugin-svelte 4 needs vite 5, pins vite 6 #30

Closed

Description

@TMHSDigital

Summary

templates/nui-svelte/web/package.json pairs @sveltejs/vite-plugin-svelte ^4.0.0 with vite ^6.0.0. Every 4.x release of the plugin declares peerDependencies: { "vite": "^5.0.0" }, so npm install (npm 7+) fails with ERESOLVE.

Where

  • templates/nui-svelte/web/package.json:14 (@sveltejs/vite-plugin-svelte)
  • templates/nui-svelte/web/package.json:16 (vite)

Details

"devDependencies": {
  "@sveltejs/vite-plugin-svelte": "^4.0.0",
  "typescript": "^5.7.0",
  "vite": "^6.0.0"
}

Registry metadata for @sveltejs/[email protected] lists "vite": "^5.0.0" as a peer. Vite 6 support starts with plugin 5.x. No 4.x release can sit next to any vite 6.x.

Impact

Anyone who copies the Svelte NUI template and runs the documented first step, npm install, gets an ERESOLVE failure and no build. Getting past it with --legacy-peer-deps leaves the plugin running on a vite major it does not support.

Steps to reproduce

  1. Copy templates/nui-svelte/web to an empty directory.
  2. Run npm install.
  3. npm reports Could not resolve dependency: peer vite@"^5.0.0" from @sveltejs/[email protected].

Suggested fix

Bump @sveltejs/vite-plugin-svelte to ^5.0.0 (peer vite ^6), or move both packages to current matching majors together. Optionally add a CI job that runs npm install --package-lock-only in each templates/*/web to catch peer drift.

Acceptance criteria

  • npm install && npm run build succeeds in a fresh copy of templates/nui-svelte/web with no peer-dependency override.
  • Plugin and vite majors are compatible per their declared peer ranges.

Getting started

  • Relevant files: templates/nui-svelte/web/package.json
  • How to run checks: there is no test suite yet; run the MCP server with cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in .github/workflows/validate.yml
  • Related docs: skills/nui-development/SKILL.md

Filed by repo-audit/full-audit at 701824d. Severity: high. Effort: S. audit-key: dependencies|templates/nui-svelte/web/package.json|@sveltejs/vite-plugin-svelte

Activity

  1. added
    good first issue
    dependencies
    on Nov 21, 2026
  2. TMHSDigital commented on Nov 21, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 49b8e5b.

    Bumped @sveltejs/vite-plugin-svelte to ^5, which supports vite ^6 and svelte ^5.

    Verified: Clean npm install and npm run build of a copy of templates/nui-svelte/web succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesgood first issueseverity: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions