Skip to content

[v3] Vite server not cleaned up when build fails #4403

@jghiloni

Description

@jghiloni

Description

When a wails3 dev build fails on v3.0.0-alpha.10 after the Vite server has started, the vite process is not stopped and must be manually cleaned up.

To Reproduce

  1. Create a project whose build fails after vite starts (eg. don't put your main.go in the root of the repository)
  2. Run wails3 dev
  3. After it fails, run wails3 dev again.

Expected behaviour

I expected the build to behave the same both times. In reality I see this:

...
> vite -- --port 9245 --strictPort

Port 5173 is in use, trying another one...

Screenshots

No response

Attempted Fixes

No response

System Details

Wails (v3.0.0-alpha.10)  Wails Doctor

# System

┌──────────────────────────────────────────────────┐
| Name          | MacOS                            |
| Version       | 15.5                             |
| ID            | 24F74                            |
| Branding      | Sequoia                          |
| Platform      | darwin                           |
| Architecture  | arm64                            |
| Apple Silicon | true                             |
| CPU           | Apple M3 Pro                     |
| CPU 1         | Apple M3 Pro                     |
| CPU 2         | Apple M3 Pro                     |
| GPU           | 14 cores, Metal Support: Metal 3 |
| Memory        | 18 GB                            |
└──────────────────────────────────────────────────┘

# Build Environment

┌────────────────────────────────┐
| Wails CLI    | v3.0.0-alpha.10 |
| Go Version   | go1.24.4        |
| -buildmode   | exe             |
| -compiler    | gc              |
| CGO_CFLAGS   |                 |
| CGO_CPPFLAGS |                 |
| CGO_CXXFLAGS |                 |
| CGO_ENABLED  | 1               |
| CGO_LDFLAGS  |                 |
| GOARCH       | arm64           |
| GOARM64      | v8.0            |
| GOOS         | darwin          |
└────────────────────────────────┘

# Dependencies

┌───────────────────────────┐
| npm             | 10.9.2  |
| *NSIS           | v3.11   |
| Xcode cli tools | 2409    |
|                           |
└─ * - Optional Dependency ─┘

# Checking for issues

 SUCCESS  No issues found

# Diagnosis

 SUCCESS  Your system is ready for Wails development!

Need documentation? Run: wails3 docs
 ♥   If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions